JavaScript error when saving comments

Topics: ASP.NET 2.0
Apr 9, 2011 at 12:16 PM
Edited Apr 9, 2011 at 12:31 PM

I'm getting an odd error when trying to save comments "a is null".

At first my site was configured so it wasn't showing the websiteBox and I got a pretty clear error message about that - easy fixes for that were turning on the option for adding a website to comments, or adding a guard clause in the JavaScript. Ok so not perfect, I don't really want to edit the js file as it's then "one more thing" to have to check when upgrading versions and I didn't really want to force people to add a website address.

But now the error is much more cryptic "a is null" and it points to the minified blog.js but it's not easy to locate which variable it's referring to. Can you help?


I have pulled down a copy of blog.js from the tip ( and I still have the problem. 
Website is  

Apr 9, 2011 at 2:00 PM
Edited Apr 9, 2011 at 2:00 PM

When I view your page with IE9 I get the following error:


Can't find brush for: py"

Try disabling the SyntaxHighlighter extension and see what happens. I've had issues out of that extension before and had to disable it so maybe it might have to do with your issue.

Apr 9, 2011 at 7:32 PM

Unfortunately disabling the extension doesn't fix the problem, the "Saving comment..." message never goes away. Your test comment however did make it into the system and is awaiting approval - Thanks for testing :)

Yeah as for the SyntaxHighlighter not finding the Python brush... not sure about that. I rarely use Python, so it's not a big issue (I might just change all the references in that post to plain to get past it for now.

Apr 9, 2011 at 7:36 PM
Edited Apr 9, 2011 at 7:40 PM

Ok, the SyntaxHighlighter issue was down to me - there's a whole Syntax Highlighter section in the admin tools and I'd disabled Python in that list. 
Rather embarrassing! 

And the posts are working too... I've got a few odd ones to delete that I added in testing, but many thanks for your help

Apr 9, 2011 at 7:48 PM

No problem! Glad you got it working.

Apr 9, 2011 at 8:11 PM

And now the comments are back to doing the same thing - the message never clears, I'm sure I didn't change anything :S

Apr 12, 2011 at 7:57 PM

I'm not sure what happened, why my posts were going through - but now they've stopped again.

I've double checked, the version of blog.js that's live is the latest version from the tip. For some reason though an error is being triggered "a is null" when trying to submit a comment and I can't think of a decent way to debug it.

Apr 14, 2011 at 7:40 PM


When I'm authenticated I can post comments with no problem. I have that option set in my configuration - but that's not much help to users trying to post. Any one got any suggestion for how to fix this bug?

Apr 14, 2011 at 10:18 PM

When I disabled AkismetFilter (Admin - Extensions - AkismetFilter) it resolved the problem for me.

Apr 15, 2011 at 7:53 PM

That's done it - not great that there's a javascript collision between the 2 ... but it's working for me now. many thanks