On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi everyone,

    I have a weird problem with modx.
    Sometimes the CSS (frontend, not manager) is not loading.
    After clearing the cache, it works fine again.

    Then, after about 3 weeks to 2 months, CSS is not loading again.
    Then after clearing the cache again manually it's loading.

    This always repeats after a certain (not repeating) amount of time.

    Does anyone experience the same problem or does anyone know, what this problem is causing?

    After days and days of testing, I can definitely say it's not caused by a snippet, plugin or custom manager page.

    Here some general information:
    modx version 2.2.8 (upgrading to 2.2.10 in 2 weeks)
    running on centos 6
    consists of 712 resources, 52 snippets, 63 chunks, 15 plugins (6 custom/self-made), 4 custom manager pages, 12 users, 4 user-roles, 4 media-sources

    I would really appreciate your help if someone has an idea.

    Cheers
    Fabian [ed. note: fk_abs last edited this post 7 years, 10 months ago.]
    • How is the CSS loaded? In the template, or by a snippet?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • first of all, thanks for your reply

        the style-directives are defined in a chunk, which gets loaded in the template itself
        • And when it fails, this chunk has not been loaded?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • no, in this case, this chunk doesn't load
            it's really weird

            after clearing the cache, it's loading again

            I'm really surprised that this happens kind of "random" every 3 weeks and 2 months or so, with no pattern behind (updating a plugin for example or updating a specific resource)

            well "random" is not suitable in this case, something is causing this behavior for sure
            • do you think that it might help outputting the css-directives with a snippet and call it uncached?
              • Is this then the case for all Resources or only for one or for some of them?

                did you put this chunk directly at your template?

                what is your tag for that chunk?

                what is the content of that chunk?
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                • >> Is this then the case for all Resources or only for one or for some of them?
                  unfortunately this holds true for all resoruces, because this chunk is used in every template

                  >> did you put this chunk directly at your template?
                  >> what is your tag for that chunk?
                  yes, this chunk is directly in the template in the head-portion

                  <head>
                      [[$head]]
                  </head>
                  


                  >> what is the content of that chunk?
                  this chunk contains all link- and script-tags, pretty standard (one stylesheet, a print.css, jquery and a custom.js)
                  at the beginning of that chunk I call another chunk [[$meta]], which sets my meta-tags for sharing, search-engine bots, meta-description, base and so on

                  here is the complete output (# replaces content):

                  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
                  <meta name="language" content="de">
                  <title>#######</title>
                  <base href="#######">
                  <meta name="description" content="#######">
                  <meta name="keywords" content="">
                  <meta http-equiv="expires" content="0">
                  <meta name="robots" content="index,follow,noarchive">
                  <meta name="googlebot" content="">
                  <meta name="author" content="#######">
                  <meta name="copyright" content="#######">
                  <meta name="publisher" content="#######">
                  <meta name="rating" content="general">
                  <meta name="MSSmartTagsPreventParsing" content="TRUE">
                  <meta name="google" content="notranslate">
                  <link rel="shortcut icon" href="favicon.ico">
                  <link rel="stylesheet" type="text/css" href="assets/templates/css/style.css">
                  <link rel="stylesheet" type="text/css" href="assets/templates/css/flexslider.css">
                  <link rel="stylesheet" type="text/css" href="assets/templates/css/print.css" media="print">
                  <link rel="alternate" type="application/rss+xml" title="Follow this website with RSS" href="#######">
                  <script src="assets/templates/js/jquery-1.9.1.min.js" type="text/javascript"></script>
                  <script src="assets/templates/js/jquery.flexslider-min.js" type="text/javascript"></script>   
                  <script src="assets/templates/js/custom.js" type="text/javascript"></script>
                  
                  [ed. note: fk_abs last edited this post 7 years, 10 months ago.]
                  • Do you have the base_href hard-coded, or do you use [[++site_url]]
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                    • I use [[++site_url]]