0
Welcome Guest! Login
0 items Join Now

Gantry 5 template + debug = try to load media/cms/css/debug.css

    • JimmyDT's Avatar
    • JimmyDT
    • Jr. Rocketeer
    • Posts: 45
    • Thanks: 1

    Gantry 5 template + debug = try to load media/cms/css/debug.css

    Posted 8 months 2 weeks ago
    • Hi,

      While using browser developer tools I noticed an error in my joomla 4 site (with system debug mode on):
      Refused to apply style from 'https://[server]/media/cms/css/debug.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled

      I think the issue is that /media/cms/css/debug.css doesn't exist, and the server is returning a 404 page.

      This reference to /media/cms/css/debug.css is in the head of index.php. I think this reference is added by Gantry 5 (or the template that uses it, Studius). If the site uses the default joomla 4 template (cassiopeia) the error doesn't show up. Also, if I turn off debug mode, then the error disappears.

      There's a file /media/cms/css/debug.css in my joomla 3.10 instance, but not in any of my joomla 4 instances. Instead it's in /media/system/css/debug.css. The files are pretty much identical.
    • Last Edit: 8 months 2 weeks ago by JimmyDT.
    • Karol Orzeł's Avatar
    • Karol Orzeł
    • Elite Rocketeer
    • Posts: 4787
    • Thanks: 289
    • One Crazy Dev

    Re: Gantry 5 template + debug = try to load media/cms/css/debug.css

    Posted 8 months 1 week ago
    • Thank you for the detailed description of your issue. Based on what you've shared:

      The change in location of debug.css from Joomla 3.x to Joomla 4.x seems to be the root cause of the problem.
      If the reference to /media/cms/css/debug.css is coming from Gantry 5 or the Studius template, it would indeed be incorrect for a Joomla 4 installation.
      Firstly, can you please confirm which version of Gantry 5 you are using? The reason I ask is that there have been several updates to Gantry 5 to make it more compatible with Joomla 4, and this specific issue should have been addressed in Gantry 5.5.16.

      If you're using an older version of Gantry 5, I would recommend updating to the latest stable version. This should potentially resolve the issue. If you're already using Gantry 5.5.16 or a newer version and still encountering the problem, then it might be a lingering bug or a unique issue related to your setup.

      For a temporary fix, you could:

      Create a symlink or copy the debug.css file from /media/system/css/debug.css to /media/cms/css/debug.css, but this is just a workaround, and the real issue should ideally be addressed at its root.
      Let me know the Gantry version, and we can proceed from there.

      Warm regards,
      Karol Orzeł.
    • karolorzel.com
    • JimmyDT's Avatar
    • JimmyDT
    • Jr. Rocketeer
    • Posts: 45
    • Thanks: 1

    Re: Gantry 5 template + debug = try to load media/cms/css/debug.css

    Posted 8 months 1 week ago
    • Thank you for the reply.

      I am indeed using Gantry 5.5.16.
    • Karol Orzeł's Avatar
    • Karol Orzeł
    • Elite Rocketeer
    • Posts: 4787
    • Thanks: 289
    • One Crazy Dev

    Re: Gantry 5 template + debug = try to load media/cms/css/debug.css

    Posted 8 months 1 week ago

Time to create page: 0.049 seconds