We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20135
    • 188 Posts
    Hi, Have just upgraded from 1.0.4 to 1.0.5 and I’m having a weird problem. When I access the website without being logged into the Manager, none of the stylesheets that are included in the CMS load. If on Firefox I browse to the ID of a stylesheet I can view the css, but on IE I get a 404 error.

    However, if I log into the Manager, all the stylesheets work.

    There are no web users or permissions, only Manager users and permissions, which were in place prior to the upgrade. I can’t think of any other reason as to why the stylesheets shouldn’t load; all other MODx functionality seems to in place and working correctly.

    Help huh

    [Edit: Firebug/Chrome Dev tools report 500 internal server errors on the html page, plus all of the stylesheets. Again, this only occurs outside of Manager login]
      • 25663 MODX Staff
      • 12,272 Posts
      I suspect you don’t have a base href in your template headers.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 20135
        • 188 Posts
        Ok, but why would this be different between 1.0.4 and 1.0.5?
          • 20135
          • 188 Posts
          Adding base href didn’t make a difference...
            • 21257 MODX Staff
            • 730 Posts
            Do you have any TVs which use the @INHERIT binding followed by a value which serves as a default?
            e.g. @INHERIT someDefaultValue
              Mike Schell
              Lead Developer, MODX Cloud
              Email: [email protected]
              GitHub: https://github.com/netProphET/
              Twitter: @mkschell
              • 20135
              • 188 Posts
              We do... But not for the homepage, which is also included in the issue. Is there something that could be affecting it?
                • 36404
                • 307 Posts
                hi,

                a little question... you say you can browse to the id of a stylesheet, does that mean that your stylesheets are not css files in the /assets/css directory but MODx ressources ?

                if so, have you checked in the ressources properties the ressource type is set to text/css

                if i’ve misunderstood that browsing to the stylesheet id thing, something else you could check, the css file rights, depending on what changes you did when upgrading they may have changed

                have swing
                  réfléchir avant d'agir
                  • 20135
                  • 188 Posts
                  Quote from: virtualgadjo at Jul 12, 2011, 01:26 AM

                  hi,

                  a little question... you say you can browse to the id of a stylesheet, does that mean that your stylesheets are not css files in the /assets/css directory but MODx ressources ?

                  if so, have you checked in the ressources properties the ressource type is set to text/css

                  have swing

                  Correct: CSS stylesheets are MODx resources, and yes they are set to text/css. As mentioned previously, they work when logged into the Manager.
                    • 36404
                    • 307 Posts
                    hi, just edited my post fearig to be wrong about that id thing smiley

                    now, something that could be help, how have you linked to the stylesheet. Remember that the htaccess file excludes the /manager directory (and the /assets one) from the rewriting rules, that may explain why ths css work in the manager but not in the web site

                    actually a simple working link would be link href="/your-file-alias

                    but it depends also on the extension you use for your files (i use no extension and have somes json file working like this (script src="/the-alis")

                    have swing

                    (forgot to say that in this case i leave the ressource type on text/html not to be annoyed by this extension stuff but not sure it’s important...)
                      réfléchir avant d'agir
                      • 20135
                      • 188 Posts
                      I’m not using any friendly urls (hence linking to the id). The links for all css are the same as this:
                      <link rel="stylesheet" href="index.php?id=278" />


                      Remember that the htaccess file excludes the /manager directory (and the /assets one) from the rewriting rules, that may explain why ths css work in the manager but not in the web site
                      Wouldn’t there be a problem showing any page on the site if this were the case? As it is, I can view the html for any page I wish, but the stylesheets won’t load for those pages unless I’m logged into the Manager.

                      It could be that the problem is to do with the 500 internal server error. Like I said, if I browse to the css directly, even when not logged in, the stylesheet will load, but FF/Chrome still reports a 500 error. What could be causing this?