Jump to content

Impossible to add the product to the cart. textStatus: 'parsererror'


gregory.budin

Recommended Posts

Hi guys! 

 

I've recently started receiving this error when adding a product to cart (PS1.6):

 

Impossible to add the product to the cart.
textStatus: 'parsererror'
errorThrown: 'SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data'

 

 

Any idea how to solve this problem? I am trying to find the solution in various forums since friday, but have not manged yet. Maybe someone had smth similar? 

 

One thing which I have found out the latest - it happens when the friendly url option is on. When it is off, everything works as normal. 

Edited by gregory.budin (see edit history)
Link to comment
Share on other sites

some update on the issue:

 

 

I tried moving the web page to another domain, which i owe and which is located on the same server. what i did was:

1. archived through the cPanel of the hosting

2. moved the archive to domain.com/shop

3. extracted the archive via cPanel

4. changed htaccess and /config files accordingly

 

and surprisingly the site worked fine - no errors, no nothing. However, after relocating the page back to the original location, the error appeared again. The problem is still not solved, but there are at least 2 new symptoms - error dissappears when:

1. friendly url is off

2. a site is moved to another place

Link to comment
Share on other sites

some update on the issue:

 

 

I tried moving the web page to another domain, which i owe and which is located on the same server. what i did was:

1. archived through the cPanel of the hosting

2. moved the archive to domain.com/shop

3. extracted the archive via cPanel

4. changed htaccess and /config files accordingly

 

and surprisingly the site worked fine - no errors, no nothing. However, after relocating the page back to the original location, the error appeared again. The problem is still not solved, but there are at least 2 new symptoms - error dissappears when:

1. friendly url is off

2. a site is moved to another place

 

Well right off that info you provided, i'll guess that it's because of server configurations.

parseError would most likely be 500 response from server, that's why it fails at line 1.

 

 

What you would like to do is get some apache error logs(i assume you ride apache since most people do) and post them here.

1) Clean your logs

2) Cause error explicitly 

3) Look contents of apache error logs

 

P.S.: All of this is just my guess, my primary skill is not server configurations, but from experience.

Edited by blackarma (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...