<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NemoPS &#187; error</title>
	<atom:link href="http://nemops.com/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Quick tip: How to Debug Prestashop Error 500 (1.5)</title>
		<link>http://nemops.com/debug-prestashop-error-500/</link>
		<comments>http://nemops.com/debug-prestashop-error-500/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 09:10:51 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 1.5]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=437</guid>
		<description><![CDATA[<p>If you just upgraded Prestashop to version 1.5, or are trying to make your modules compatible with this new version, you might have run into the cryptic Internal Server Error (500). Let&#8217;s see how to make it more understandable in Prestashop. Watch the screencast UPDATE &#8211; Fixing Paypal error 500 in Prestashop 1.5 I am [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/debug-prestashop-error-500/">Quick tip: How to Debug Prestashop Error 500 (1.5)</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you just upgraded Prestashop to version 1.5, or are trying to make your modules compatible with this new version, you might have run into the cryptic Internal Server Error (500). Let&#8217;s see how to make it more understandable in Prestashop.<span id="more-437"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/sFSg0WOvSzg" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<h2 class="separator"></h2>
<h2>UPDATE &#8211; Fixing Paypal error 500 in Prestashop 1.5</h2>
<p>I am just out of a hourly struggle with the Paypal module in 1.5. If you happen to get error 500, and can&#8217;t solve it in anyway, it&#8217;s mostly due to the url. The paypal module uses the following url to perform the payment (express checkout):</p>
<pre class="brush: php; title: ; notranslate">http://mystore.com/modules/paypal/express_checkout/submit.php</pre>
<p>And this is <strong>BAD, </strong>since Prestashop 1.5 uses the following structure:</p>
<pre class="brush: php; title: ; notranslate">http://mystore.com/index.php?fc=module&amp;amp;module=modulename&amp;amp;controller=modulecontroller</pre>
<p>So, it&#8217;s necessary to change the url that points to the first link, into something Presta 1.5 likes, using the second API reference. So! Here is an example if you use express checkout, like the link above.</p>
<p>Go to <strong>modules/paypal/views/templates/front/express_checkout/paypal.tpl </strong>and change the action of the form with ID <strong>paypal_payment_form</strong> from</p>
<pre class="brush: php; title: ; notranslate">action=&quot;&quot;{$base_dir_ssl}modules/paypal/express_checkout/submit.php&quot;</pre>
<p>to</p>
<pre class="brush: php; title: ; notranslate">action=&quot;{$base_dir_ssl}index.php?fc=module&amp;amp;module=paypal&amp;amp;controller=expresscheckoutsubmit&quot;</pre>
<p>Again, <strong>this is for the one page checkout! </strong>If you&#8217;re using 5 steps checkout, you will need to edit the links in <strong>modules/paypal/views/templates/front/paypal.tpl</strong></p>
<p>Now open up <strong>modules/paypal/express_checkout/paypal_express_checkout.php</strong>. Go to (approximately) line 223 and change this:</p>
<pre class="brush: php; title: ; notranslate">		$fields['RETURNURL'] = PayPal::getShopDomainSsl(true, true)._MODULE_DIR_.$this-&amp;gt;name.'/express_checkout/submit.php';</pre>
<p>Into this:<br />
&nbsp;</p>
<pre class="brush: php; title: ; notranslate">		$fields['RETURNURL'] = PayPal::getShopDomainSsl(true, true)._PS_DIRECTORY_.'index.php?fc=module&amp;amp;module=paypal&amp;amp;controller=expresscheckoutsubmit';</pre>
<p>This way, we ensure Paypal returns to the correct page when coming back to the site and confirming the order.</p>
<div class="separator"></div>
<h2>Text version &#8211; How to Debug Prestashop Error 500</h2>
<p>Error 500 is a nightmare for every developer, because it doesn&#8217;t tell you anything at all about what&#8217;s going on. It&#8217;s more or less like the scary Blank Page.</p>
<p>If you had this error with Prestashop 1.4, it was probably due to some .htaccess misconfiguration when activating friendly urls, or some folders permissions not set to <strong>0755</strong>. However, Prestashop was crystal clear about errors if the <strong>display_errors</strong> setting in <strong>config.inc.php</strong> was set to true. But now you already did it, and you also turned on <strong>ps_debug_sql</strong>! Plus, you are not using any htaccess special configuration, and you are whether set the folders permissions to 0755 or running the store on a local environment. So, what&#8217;s the catch?</p>
<p>Prestashop 1.5 comes with some new <strong>Exception</strong> classes, to help the developer have a better tracking of the errors&#8217; source. Howver, what Prestashop doesn&#8217;t tell you, since it does not have a decent user manual, is that <strong>you have to enable the development mode</strong> to take advantage of the new debugging features.</p>
<p>So, just head to<em> config/</em> and open up<strong> defines.inc.php</strong>. Then, set <strong>_PS_MODE_DEV_</strong> to <strong>TRUE</strong> as shown below</p>
<pre class="brush: php; title: ; notranslate">define('_PS_MODE_DEV_', true);
define('_PS_DEBUG_PROFILING_', false);
define('_PS_MODE_DEMO_', false);</pre>
<p>It should be at line 28.</p>
<p>Now go back to the error page and refresh, you should see something like this (may vary depending of the exception thrown)</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/09/Prestashop-error-500.png"><img class="aligncenter size-large wp-image-447" title="Prestashop error 500 Debugged" src="http://nemops.com/wp-content/uploads/2012/09/Prestashop-error-500-680x496.png" alt="Prestashop error 500 Debugged" width="680" height="496" /></a></p>
<p>In this case, I can now see that a table I&#8217;m referencing doesn&#8217;t exist.</p>
<p>So, this is everything on how to debug prestashop error 500. Even if you don&#8217;t understand a single line of the error above, you might hopefully be able to fix it with your developer (by the way, if you need one, <a title="Hire me!" href="http://nemops.com/contact"><strong>you can hire me</strong></a>!).</p>
<p>The post <a rel="nofollow" href="http://nemops.com/debug-prestashop-error-500/">Quick tip: How to Debug Prestashop Error 500 (1.5)</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/debug-prestashop-error-500/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
