Page 1 of 1

syntax unexpected token < in JSON at position 0 - in admin orders

Posted: Fri Mar 09, 2018 8:29 pm
by Baski
Hi, in my OC 2.0.3.1 with Journal theme, i get the following error

syntax unexpected token < in JSON at position 0
parseerror

<b>Notice</b>:undefined variable;json in <b>/var/www/store/system/modification/admin/controller/sale/order.php</b> on line<b>2234</b>

when i try to edit any orders in the admin, can anyone help me please ??

Re: syntax unexpected token < in JSON at position 0 - in admin orders

Posted: Fri Mar 09, 2018 8:34 pm
by straightlight
v2.0.3.1 is quite an old version. In order to avoid passed headaches that used to be reported a lot on the forum to rectify this issue, it would rather be suggested to upgrade to at least v2.3.0.2 release of OC.

Re: syntax unexpected token < in JSON at position 0 - in admin orders

Posted: Fri Mar 09, 2018 10:39 pm
by thekrotek
You have an error in modified file, which means one of your extensions is causing the issue. The only way to solve this is to look into this file. Or you can simply try to set Display Errors to No in store settings.

Re: syntax unexpected token < in JSON at position 0 - in admin orders

Posted: Fri Mar 09, 2018 11:03 pm
by Baski
Thanks i tried setting Display errors to no and i got the following error msg

SyntaxError: Unexpected end of JSON input
parseerror

Re: syntax unexpected token < in JSON at position 0 - in admin orders

Posted: Fri Mar 09, 2018 11:25 pm
by straightlight
Alert messages ignores the display errors messages. Following my instructions above will save you lots of headaches since the alert JS function does not take PHP errors into considerations as the reported issue has been fixed since quite sometime.