Page 1 of 1

Store stopped working suddenly version 3.0.2

Posted: Sat Sep 09, 2017 12:08 am
by Sinsecato
My store has been online and taking orders for several weeks, with a successful order as recently as 18 hours ago. This morning a potential customer reported not being able to add products to the cart, and sure enough I can't either. When I load the store in firefox i see the following at the top of the screen:

Code: Select all

Notice: Undefined variable: _REQUEST in /.../system/library/request.php on line 26 Warning: Cannot modify header information - headers already sent by (output started at /.../system/framework.php:42) in /.../system/framework.php on line 108 Warning: Cannot modify header information - headers already sent by (output started at /.../system/framework.php:42) in /.../catalog/controller/startup/session.php on line 25
and when i attempt to add something to the cart:

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
OK
<b>Notice</b>: Undefined variable: _REQUEST in <b>/.../system/library/request.php</b> on line <b>26</b><b>Warning</b>: Cannot modify header information - headers already sent by (output started at /.../system/framework.php:42) in <b>/.../system/framework.php</b> on line <b>108</b><b>Warning</b>: Cannot modify header information - headers already sent by (output started at /.../system/framework.php:42) in <b>/.../catalog/controller/startup/session.php</b> on line <b>25</b>{"success":"Success: You have added <a href=\"http:\/\/mydomain.com\/index.php?route=product\/product&amp;product_id=51\">Antietam 2017 Longsleeve T-Shirt<\/a> to your <a href=\"http:\/\/mydomain.com\/index.php?route=checkout\/cart\">shopping cart<\/a>!","total":"1 item(s) - $15.79"}
I have no idea why the store would work fine for weeks then suddenly get this error. I have not made any changes to it in the intervening time. I am running no additional Modules other than the 'stock' extensions (paypal etc).

Any help would be greatly appreciated.

Re: Store stopped working suddenly version 3.0.2

Posted: Sat Sep 09, 2017 1:04 am
by Sinsecato
I did figure out that if i comment out line 42 in system/framework.php it solves the problem... no idea why though.

Code: Select all

if ($config->get('error_display')) {
           //echo '<b>' . $error . '</b>: ' . $message . ' in <b>' . $file . '</b> on line <b>' . $line . '</b>';
}

Re: Store stopped working suddenly version 3.0.2

Posted: Thu Sep 28, 2017 10:30 am
by straightlight
By commenting out the error lines for your store, it does not officially resolve the issue. It is simply hiding the error messages that you may still encounter on your domain. Disabling your error messages on your production domain from the admin-end would be ideal in order to prevent your users seeing these error messages. However, keeping the logs active on your file server would be really practical until no more frequent error messages appears from your store.