Latest commits in v3.3.0.beta3-dev seems to break Discourse

Our self-hosted instance is broken after rebuilding with the latest commits (commits on Jun 10 and later since one of the builds on June 10 worked fine). We are on the tests-passed update branch.

For non-admin (and non-moderator) users, it looks like all plugins are broken in a similar way.

For admin users (including mods), we see the same set of issue, plus a similar error with the admin module (below the retort plugin), which breaks early enough, that the app is completely broken.

The safe mode doesnā€™t help so much for admin users, as that doesnā€™t seem to disable the admin module anyway, and also this doesnā€™t seem to be a plugin specific problem.

Iā€™m assuming this is an issue with the latest commits. But if thatā€™s not the case, would anyone have suggestions to help us resolve this issue ?

2 Likes

Hi @ja3, unfortunately this is a Cloudflare bug. You can find instructions to work around it here:

5 Likes

Thanks! That was it :smile:

I had previously disabled Rocket loader to solve a similar issue. Should have known this might be similar.

Anyway, Iā€™m not seeing any noticeable difference in the load times after the change, given these are minified anyway as part of the Discourse build.

3 Likes

Hi, Iā€™ve just hit the same problem ā€¦ but it was affecting some people all of the time and some people some of the time. I guess this was some sort of caching issue, however whereas turning off minification seemed to help, the issue quickly returned. Iā€™ve now set the CloudFlare account in ā€œdevelopment modeā€, which bypasses the proxy, this seems to solve it (for now at least). I tried setting development mode previously and purging the cache, but it had no effect ā€¦ now it seems development mode AND disabling minification works. (which makes little sense to me)

This is a very odd problem and is something thatā€™s going to make me think twice before I click the upgrade button again. If anyone has any more info on this it would be much appreciated.

(just to note; this is a new issue, nothing apart from updates has really changed in the last few months)

@oddjobz I didnā€™t need to use development mode. Purging cache for the site did the trick (to clear out the incorrectly minified files).

One aspect to check isā€¦ do you have any configuration rules, which might be enabling/disabling minification. Or perhaps caching rules which does caching based on certain criteria.

Mmm, so minification + dev mode previously fixed the issue for both myself and other users. Last night the issue came back (I wasnā€™t able to check with anyone else) I went back to the CF console and minification was still disabled. Developer mode however had seemingly ā€œautomaticallyā€ turned itself off (!) Iā€™m kinda guessing it has an expiry period (?)

Anyway, developer mode + cache clear immediately re-fixed the issue for me.

This isnā€™t sustainable for me so Iā€™ve started looking at CF alternatives, does anyone have any recommendations or indeed any possible alternatives?

Looks like Fastly is the recommended CDN. I havenā€™t used it with discourse but they are generally very good.

Ok, many thanks, Iā€™ll take a look :slight_smile: