Bug - Doesn't work in Maintenance mode

Create issue
Issue #3 resolved
Former user created an issue

I have an example website it loads the javascript from a Page File using the Javascript mime-type. In normal mode everything works fine.

When you go into Settings and turn on Maintenance mode the plugin doesn't work and saying the following error message: "refused to execute script from 'https://www.example.com/themes/ache/assets/js/scripts.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled."

Please fix this bug! Can create the bug in Google Chrome, Firefox and Edge etc. All Broswers say same thing! This plugin doesn't work when Maintenance mode is turned on.

Comments (9)

  1. Alexey Sozonov repo owner

    I don't think that is a bug. When Maintenance mode is enabled you can't access to any pages on your site. So this is expected behavior. But I will check opportunity for adding some pages to exceptions.

  2. Mai Tai

    Thank you for quick reply, just to let you know a bit more information. I am loading a 'page' file called: 'maintenance.htm' in the settings it is setup to that page in the maintenance mode. The javascript I am loading for the 'maintenance.htm' page location is 'scripts.htm' in a 'page' and is the issue that can not be loaded.

    I will follow and see if you can find an opportunity to be able to add this feature or not? If not I was thinking of raising an issue with October in github. But I thought I contact you first.

  3. Mai Tai

    Hi, many thanks for updating the plugin. I upgraded it to 1.1.3 and tested out everything again after resetting the cache on everything. Still same problem! Maybe it can not be done. I leave it up to you if you want to keep trying or close this issue. Thanks again for quick response!

  4. Mai Tai

    Ok I just tried testing with the Force Visible ticked box checked this time.

    The Javascript mime-type is working now, and says: "content-type: application/javascript" instead of "content-type: text/html". But the file is getting blocked and says a 503 server error code.

    Do you think the 503 server error code is part of October CMS and not your plugin now? Just wondering if I should open an issue over there now?

  5. Mai Tai

    Hi, I have just fully tested it out and everything is working now! Pretty amazing stuff! You can close this issue now. Very impressive!

  6. Log in to comment