gregory.budin Posted June 8, 2015 Share Posted June 8, 2015 (edited) 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 June 8, 2015 by gregory.budin (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted June 9, 2015 Share Posted June 9, 2015 Can you see that JSON response in browser console? Link to comment Share on other sites More sharing options...
gregory.budin Posted June 9, 2015 Author Share Posted June 9, 2015 Can you see that JSON response in browser console? I am not sure how to do it. How do I open the console? Link to comment Share on other sites More sharing options...
tuk66 Posted June 9, 2015 Share Posted June 9, 2015 Usually F12, but every browser is different. Link to comment Share on other sites More sharing options...
gregory.budin Posted June 9, 2015 Author Share Posted June 9, 2015 Usually F12, but every browser is different. Ok. That what i thought. What shall I look for? Link to comment Share on other sites More sharing options...
gregory.budin Posted June 9, 2015 Author Share Posted June 9, 2015 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 More sharing options...
blackarma Posted June 9, 2015 Share Posted June 9, 2015 (edited) 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 June 9, 2015 by blackarma (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now