SyntaxError: Unable to parse JSON string
-
Hello Everyone!
I keep on having this error ‘SyntaxError: Unable to parse JSON string’ whenever i try to add something to the cart.
Does anyone can help?
I use a free webhost, 000webhost, do you think it is related?
Many Many thanks for your help!
Cheers
-
got a link ?
Thank you!
here is the link:
http://www.pizza-americaine.site40.net/?page_id=79hmm,
there are 2 parts to this.
the error you are getting is because your are running out of memory
<b>Fatal error</b>: Allowed memory size of 67108864 bytes exhausted (tried to allocate 491520 bytes)…..in wppizza/ajax/get-json.php</b> on line <b>461the above is very odd though because
a) i am running it here with 2mb memory without issue (and you have a mem limit of 64mb)b) when adding an item , the script should never even get to line 461 (in fact , it should exit at about line 121)
something else is amiss here (and i just tested it with your theme and the plugins you have – at least the ones i can see in the friontend – and it works just fine
might be worth turning on debug and check what your debug log file says
your theme/host also seems to include an analytics code which MIGHT cause issues (just trying to wittle things down)
maybe disable that one (http://www.youtube.com/watch?v=ohwtC3_qd4o) and see if that helps things (long shot though)
other than that, did you edit anything (templates etc) ?
this might also be worth a read:
Hello Ollybach
thank you very much
ive tried to remove the script following the video. That did not make any change.
The only modification in the css i ve made is to center the logo. But i dont thing that can have a connection with the issue.
So i ve changed template to use TwentyTwelve, and it seems that the error is gone.
But its a pity because i very much like Responsive.
With Twentytwelve, could you please tell me how I can have the cart displayed on the very right?
http://www.pizza-americaine.site40.net/?page_id=79Maybe i could change from webhost.
Would you be kind enough to tell me which one you’re using? (free host)Many thanks for your help !
Also, the debug consol says with Responsive theme:
Notice: Constant WP_MEMORY_LIMIT already defined in /home/a4390281/public_html/wp-config.php on line 101
I forgot to tell you i tried to increase memory by following these instructions:
http://blog.kdmahawar.com/php-memory-error-wordpress-000webhost/but i removed everything now.
Again, thank you very much
Hello there
it appears that using chrome, i have this error insteaderror : SyntaxError: Unexpected token <
and on safari i have:
error : SyntaxError: Unable to parse JSON stringIn case it helps!
many thanks!
>Notice: Constant WP_MEMORY_LIMIT already defined in
looks like you have the same declaration 2x
>error : SyntaxError: Unexpected token <
and
>error : SyntaxError: Unable to parse JSON stringstill the same error which says ” Allowed memory size of 67108864 bytes exhausted” etc
> webhost:
there are 1000’s and i hazard I guess that my host (which is in the UK and not free) will not necessarily be a good choice in your case .
your host should really be in the territory/country your website is inat the end of the day, you get what you pay for
also, when you used a different theme it worked (from what you were saying) now you are using another theme again and it doesnt , so somewhere along the lines something isn’t right
as i mentioned , using responsive theme ore twentytwelve , or any other standard themes (and many more) work just fine as far as I am concerned so something appears to be messed up your end (and it may just be your host)….
sorry, but i dont think there’s anything wrong in the plugin or anything i can do, as I’m sure if that were the case there would be a lot more complaints/support requests
thank you very much for your reply! you’re totally right, i will just go ahead and pay for a regular host.
thank you again!there are probably some other free hosts that do not inject all sorts of ads/js. just seems that this one seems to do this sort of thing
(never mind the fact that they are also injecting a 2 year old version of jQuery so you end up with 2 separate/different versions of jquery on your page. that’s just asking for trouble)
The topic ‘SyntaxError: Unable to parse JSON string’ is closed to new replies.