0

I am working on this widget and making some progress, but not sure why this new error started happening. Here is the url to see the page and the error in the console:

http://www.comehike.com/outdoors/widget.php?hike_id=108&height=600&width=700

Any idea what is causing this error message and how to fix it?

Thanks!!

1 Answer 1

1

I'm not sure if your code has changed since you first posted this a month and a half ago, but I thought I'd mention that this can happen if you're trying to parse invalid JSON from a JSON string via JSON.parse()

I had that happen to me, and I figured out that all the code worked except the JSON.parse() call, which before commented, and after uncommented, gave me this same error. Thus I looked into the contents of the JSON string I was passing to the JSON.parse() call, and found that it was to blame for the error.

Funny thing was, all I really had to do was refresh the page, because somewhere along the line, the JSON string got screwed up, so it just needed to be refreshed. Hope this proves helpful to anyone else running into this issue and might be using JSON.parse() to parse a string of JSON.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.