Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

How to debug "Javascript Parse Error"?


4 Posts   5686 Views


19 August 2010 at 6:21pm Community Member, 23 Posts

I have been now using SS for couple of months and find it quite extensible. But there is one issue which leaves me stumped, the "Javascript Parse Error".

I have no idea why and when this errors pops up. The same code will work fine on one server but will give "Javascript Parse Error" on another.

What are the most common causes of this error? How do I go about finding the cause of this error. Any information will be helpful.


19 August 2010 at 6:51pm Forum Moderator, 5511 Posts

If its JavaScript the best place to debug is your browsers console panel. Firebug is a useful plugin for firefox, displays the console inline in the webpage.


19 August 2010 at 8:54pm Community Member, 23 Posts

Yes, I know I can use firebug to debug JS code.

But the thing is that I am not changing or adding any JS code. The site is using the stock JS code that came with the script. The error is triggered by something in my custom modules (though I have seen the error occur even without any custom modules).

And just to clarify, the "Javascript Parse Error" notice I am referring is to the one the appears sometimes when you are try to save or publish the page.


20 August 2010 at 3:40am (Last edited: 20 August 2010 3:46am), Community Member, 17 Posts


I am having the exact same issue... with a recent install of version 2.4.0.

I have not modified or added any javascript but I receive the Javascript Parse Error when I try to save/publish a page. It lets me save/publish the page second time around but it's a bit frustrating having to do this every time.

I have tried the Firebug console but doesn't really help much.