Post by SXT » Tue Nov 04, 2014 5:05 am

Cannot change or modify any orders. Gives syntax error. Happens on even clean install. Does that in local development server as well as hosted servers.

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

Couldn't find any solution. It is very frustrating. I would appreciate if someone could guide me to the right direction.

Attachments

2014-11-03 03.53.17 pm.png

SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK - 2014-11-03 03.53.17 pm.png (107.45 KiB) Viewed 16117 times


SXT
Newbie

Posts

Joined
Tue Nov 04, 2014 4:38 am

Post by i2Paq » Tue Nov 04, 2014 4:29 pm

Have a read on our forums, the answer is there.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

UPGRADE to 2.x: Contemplate before thou begins!

Our FREE search: Find your answer FAST!.

BUGs?: Known BUGS for All OC Versions.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by SXT » Tue Nov 04, 2014 7:31 pm

I searched the forum and also googled it but could not find a solution. Maybe I'm looking in the wrong direction. Can you guide me on what topic should I search? as search for this error doesn't bring any solution. I found one post where someone had the same issue but nobody gave a proper solution or a way to fix it.

SXT
Newbie

Posts

Joined
Tue Nov 04, 2014 4:38 am

Post by marmax » Wed Nov 05, 2014 8:54 pm

It seems the error occurs when site is in maintenance mode When in live mode is seems to work!

Read http://forum.opencart.com/viewtopic.php?f=181&t=131683
for more info.

Mark as [SOLVED] in the title if it works for you.

New member

Posts

Joined
Fri Oct 10, 2014 4:34 am

Post by Nesster » Sat Nov 08, 2014 2:31 am

In our case it was a DNS resolution problem:
http://forum.opencart.com/viewtopic.php ... 99#p522416

Frank

Newbie

Posts

Joined
Tue Oct 21, 2014 8:09 am

Post by SilverSaeeD » Sat Jan 03, 2015 8:30 am

i have this problem too :( please help...

Newbie

Posts

Joined
Sat Jan 03, 2015 7:50 am

Post by techtools » Mon Jan 12, 2015 1:06 pm

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

OK
I am also getting this error and tried all what was posted on google search using SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

Has anyone found any luck. It was working fine and just happened?

New member

Posts

Joined
Thu Oct 10, 2013 2:34 pm

Post by cornernote » Fri Jan 16, 2015 8:51 pm

Another reason this can occur is if your host is running mod_security. If this is the case you will have to contact them and ask they disable it for your account.

Just spent the last few hours debugging to find this. Hope it helps someone.

Newbie

Posts

Joined
Fri Jan 16, 2015 8:49 pm

Post by techtools » Sun Jan 18, 2015 8:54 am

tried disabling and still get SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

OK


when trying to change status on order

New member

Posts

Joined
Thu Oct 10, 2013 2:34 pm

Post by sophia15 » Fri Jan 23, 2015 1:21 pm

hello! i'm having the same problem :( i tried all the suggestions here, and still no luck. i hope someone can help me.

Newbie

Posts

Joined
Fri Jan 23, 2015 1:19 pm

Post by scarlett007 » Thu Feb 05, 2015 4:59 pm

getting the same problem.. changing a status on a order gives this error: SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

OK

Newbie

Posts

Joined
Wed Feb 04, 2015 3:43 pm

Post by viethemes » Thu Feb 05, 2015 9:06 pm

Hi,
Could you provide your site url, a admin account and a FTP account via PM, so I can take a look at this problem closer?

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by scarlett007 » Thu Feb 05, 2015 10:17 pm

This resolved my issue:

If you do this and you try to edit orders you get error like:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
If you modify admin/config.php and change this line:
define('HTTPS_CATALOG', 'http://domain.com/');
with:
define('HTTPS_CATALOG', 'http://htaccess-user:htaccess-password@domain.com/');
I don`t get that error anymore and edit order(for ex.) is working fine.

Newbie

Posts

Joined
Wed Feb 04, 2015 3:43 pm

Post by fido-x » Fri Feb 06, 2015 4:24 pm


Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Andybaby1 » Tue Feb 10, 2015 9:47 am

you're taking up too much space!is it?

canvas prints http://www.customcanvasonline.com.au/


Newbie

Posts

Joined
Fri Jan 09, 2015 9:47 am


Post by abin@opencart » Wed Feb 11, 2015 4:31 pm

I got the same error and i fixed it

go to Admin->System->users->Api

Add a new api generate password, and enable it

Then go to Admin->system->settings->Edit->Option(tab)

Select api user under Checkout section as your api user

Then save the changes

Then go to Sales->orders->edit

It will work fine :-)

Newbie

Posts

Joined
Tue Sep 03, 2013 2:16 pm

Post by smudge » Thu Feb 12, 2015 11:35 pm

Ive had a lot of issues upgrading from opencart 1.5.1 to 2.0.1

Exactly the same symptoms as yours

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

So I created a fresh database and a fresh install of opencart 2.0.1

Initially I had no issues with new orders but as more orders where added and history ammended I got the same eror intermittently.

The only way around this was to clear cookies, close browser , reboot the laptop i was using, use an alternative browser. or login to another computer to change the history status.

this message seems to just seem to come up randomly when opencart feels like it

Really I should have just stayed with old version i would have saved 3 days mucking about fixing 'issues' in a version thats obviously not ready for production yet.

Newbie

Posts

Joined
Thu Feb 12, 2015 11:34 pm

Post by viethemes » Sat Feb 14, 2015 12:31 am

smudge wrote:Ive had a lot of issues upgrading from opencart 1.5.1 to 2.0.1

Exactly the same symptoms as yours

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

So I created a fresh database and a fresh install of opencart 2.0.1

Initially I had no issues with new orders but as more orders where added and history ammended I got the same eror intermittently.

The only way around this was to clear cookies, close browser , reboot the laptop i was using, use an alternative browser. or login to another computer to change the history status.

this message seems to just seem to come up randomly when opencart feels like it

Really I should have just stayed with old version i would have saved 3 days mucking about fixing 'issues' in a version thats obviously not ready for production yet.
Could you provide your site url, a admin account and a FTP account via PM, so I can take a look at the problem closer?

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by leaveyou » Fri Mar 13, 2015 2:29 am

it seems opencart does this numerous times throughout the platform:

Code: Select all

				// Set SSL if required
				if (substr(HTTPS_CATALOG, 0, 5) == 'https') {
					curl_setopt($curl, CURLOPT_PORT, 443);
				}
Seing this, i deleted the "s" in 'https' so that admin/config.php

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'https://' . $baseurl . 'admin/');
define('HTTPS_CATALOG', 'https://' . $baseurl );
became

Code: Select all

// HTTPS
define('HTTPS_SERVER', 'http://' . $baseurl . 'admin/');
define('HTTPS_CATALOG', 'http://' . $baseurl );
but the error itself is caused by the fact that the script in the page you're viewing fails when if $this->session->data['cookie'] is not set (which can be so because of many reasons. in my case incorrect config)

So if you don't have https on your server, make sure even HTTPS_SERVER contains the regular http url

Newbie

Posts

Joined
Fri Mar 13, 2015 2:23 am

Post by loi » Fri Mar 27, 2015 5:08 pm

Hi all,
I get the same error "opencart 2.0 SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data OK" when I change Order Status. I also delete .htaccess file, api_id in oc_api table the same value in oc_setting table.
And also get the error: "Warning: No match for Username and/or Password." when I delete order

I hosted the source code on the internet and the function worked last two days and it is not working now. However when I copy the source code and run on my PC then it work.

Anyone can help me? Thanks a lots.

loi
Newbie

Posts

Joined
Fri Mar 27, 2015 4:40 pm
Who is online

Users browsing this forum: josher123 and 31 guests