Post by fogma » Sun Jun 07, 2015 4:50 am

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
Last edited by fogma on Mon Jun 08, 2015 12:35 am, edited 1 time in total.

New member

Posts

Joined
Wed Aug 13, 2008 4:16 am

Post by D3MO » Sun Jun 07, 2015 5:17 am

do you have vqmods or ocmods installed? open that file and look what that line says

Opencart Expert | voldemaras@gmail.com

Extensions for Opencart @ https://www.opencartextensions.eu / or Opencart Marketplace

Need Custom Module? debug third party module or simply have any question related to Opencart? feel free to contact directly for a live chat session:) - INSTANT LIVE CHAT


User avatar
Active Member

Posts

Joined
Mon Apr 04, 2011 6:57 am

Post by fogma » Sun Jun 07, 2015 5:23 am

Yes - VQmod installed.

Line 2221 in order.php is:

Code: Select all

$this->response->setOutput($json);
Thanks,
Gary

New member

Posts

Joined
Wed Aug 13, 2008 4:16 am

Post by fogma » Sun Jun 07, 2015 5:34 am

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.....

New member

Posts

Joined
Wed Aug 13, 2008 4:16 am

Post by fogma » Mon Jun 08, 2015 12:31 am

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

New member

Posts

Joined
Wed Aug 13, 2008 4:16 am
Who is online

Users browsing this forum: No registered users and 11 guests