Page 1 of 1
[SOLVED] Error when updating an order status
Posted: Sun Jun 07, 2015 4:50 am
by fogma
I've just installed OC 2.0.2.0 and then upgraded it to 2.0.3.1.
When I try and update an order status I get a javascript popup which basically says "Syntax Error: Unexpected token < in admin/controller/sale/order.php line 2221.
Can anyone give me any pointers on what the problem could be?
Thanks,
Gary
Re: Error when updating an order status
Posted: Sun Jun 07, 2015 5:17 am
by D3MO
do you have vqmods or ocmods installed? open that file and look what that line says
Re: Error when updating an order status
Posted: Sun Jun 07, 2015 5:23 am
by fogma
Yes - VQmod installed.
Line 2221 in order.php is:
Code: Select all
$this->response->setOutput($json);
Thanks,
Gary
Re: Error when updating an order status
Posted: Sun Jun 07, 2015 5:34 am
by fogma
Ah... I see how it is working... javascript is trying to parse php's error and failing.
That suggests this if statement in order.php:
Code: Select all
if (isset($this->session->data['cookie']) && isset($this->request->get['api'])) {
is returning false, and it's going via a path that does not set the $json variable.
Now to try and understand what that if statement is doing.....
Re: Error when updating an order status
Posted: Mon Jun 08, 2015 12:31 am
by fogma
Solved.
It seems Chrome reports a different error to other browsers. In firefox the error is "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data"
That lead me to find the solution here:
http://forum.opencart.com/viewtopic.php ... 90#p542725
Gary