JS error after upgrade

AI-generated summary

After upgrading to the latest Discourse, shadowhand encountered a JavaScript error (Uncaught SyntaxError: missing ) after argument list) that prevented the forum from loading. The issue was traced to Cloudflare’s JS minification, which broke the code. shadowhand disabled minification in Cloudflare, resolving the problem. Falco clarified that minifiers should not alter program behavior, and codinghorror pointed out that the fault lay with Cloudflare’s broken minifier, not Discourse. codinghorror later reported that Cloudflare had fixed the issue globally after public attention, and the topic was closed as resolved.

After upgrading to latest discourse this morning, I see the following error in the JS console and my forum does not load:

Uncaught SyntaxError: missing ) after argument list

Here’s a screenshot of the issue, you can see it live on http://discourse.kohanaframework.org

Are you running any non-standard plugins?
Are you behind Cloudflare?

Yes, we use CloudFlare. I’ve turned off “JS minification” and that seems to have made the problem go away.

Does Discourse not test against minified files?!

The purpose of a minify is to NOT alter program behavior, while decreasing size.

Discourse already minifies the assets. Cloudfare have a broken minifier.

I think you meant to say:

Does Cloudflare not test their minifier?!

When functioning code is broken by a third party, that is not the code’s fault.

Can you please raise this with cloudflare and post your issue number here?

Sam, I’ve raised the issue to CF, my issue number is #1067945

Good news! After some public shaming on my part, this is now fixed on Cloudflare’s side for everyone, worldwide.

I’m deleting all the other topics on this as ancient history.