Post by ianhaney » Mon Mar 27, 2017 2:49 am

Hi

I am trying to update the order status for a order in view->history tab but each time I click add history, I get the following error, I can't seem to find a fix for it. I have a SSL installed on the site, could that be the issue that the admin url starts with https

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined variable: json in <b>/home/broadway/public_html/store/bmdstoreadmin/controller/sale/order.php</b> on line <b>2221</b>

I am using opencart 2.0.3.1

Thank you in advance

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ADD Creative » Tue Mar 28, 2017 12:12 am

https://github.com/opencart/opencart/bl ... /order.php only has 1997 lines. Which suggests to get an error on line 2221 is down to a modification.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ianhaney » Tue Mar 28, 2017 11:25 pm

Oh right ok, is there a way to find out or do I just need to remove each xml file from the vqmod folder and disable each extension in the modifications page on the admin side?

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ianhaney » Wed Mar 29, 2017 9:42 pm

Hi

Just having a look at this issue and in the bmdstoreadmin/controller/sale/order.php I have 2223 lines and on line 2221 is the following code

Code: Select all

$this->response->setOutput($json);
Is there any solution for this line like changing it to something else

I have compared it to the original order.php from the download folder and the line is the same in there too but I removed all the vqmod xml files and disabled all the modifications and refresh the modifications list but am still getting the error message

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ADD Creative » Thu Mar 30, 2017 7:07 pm

My mistake I was looking at 2.3.0.1 not 2.0.3.1.

The problem is $json does not exist before being used by that line. So the problem is likely somewhere before that.

This may help you. viewtopic.php?t=142841

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ianhaney » Thu Mar 30, 2017 9:46 pm

I tried every solution in the link and nothing worked, is really frustrating

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ADD Creative » Thu Mar 30, 2017 10:29 pm

Did not adding

Code: Select all

$json = array();
to just after

Code: Select all

public function api() {
not do anything?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ianhaney » Fri Mar 31, 2017 1:57 am

No unfortunately, am still getting the error below

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ADD Creative » Fri Mar 31, 2017 7:59 pm

That's a different error, so the first problem is fixed.

There looks like a number of causes of the 2nd error. http://forum.opencart.com/viewtopic.php?f=181&t=133490

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ianhaney » Sat Apr 01, 2017 12:56 am

I have gone through that post and still got the error, I can't change HTTPS to HTTP as some are suggesting in the config file as I have a SSL installed on the domain/site so if I changed HTTPS to HTTP, it would show http in the url address bar but I want the https to show in the url address bar

Active Member

Posts

Joined
Sun Jun 24, 2012 2:30 am
Location - GB

Post by ADD Creative » Mon Apr 03, 2017 10:20 pm

I agree that changing HTTPS to HTTP, doesn't sound a good idea.

If you have searched the internet and tried all possible solutions. You could try later versions. Start by installing the same version clean with no modifications to a test area on your server. Test you get the same problem. Then try later versions to see if the problem has been fixed.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 38 guests