We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17261
    • 18 Posts
    Why do I have 6 different CSS sheets, all named seemingly random and incoherent jumbles of characters? E.g.

    css_32c4ee7384bddedacb9c5a9310b2458d03689408.css
    css_36039be6a85e5b94ed5442df30fce260d16d7c71.css
    css_3e4144fcc8f7bacaa0d9097189d10990a2c9cb23.css

    ...etc? There used to only be five, but in the period of about a month, another one popped up... I would really prefer to just have one centralized CSS file because the content in these sheets are largely the same!
      • 25483
      • 741 Posts
      On what site is this?? MODx itself doesn’t create css files! You have to specify the reference to your own css files yourself.

      There are some scenarios:
      - You have a plugin that add’s it
      - Your site is hacked
        with regards,

        Ronald Lokers
        'Front-end developer' @ h2o Media

        • 7231
        • 4,205 Posts
        That is not a normal MODx behavior, are you using any 3rd party extensions? I don’t know of any modx add-on that will do that.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 17261
          • 18 Posts
          Hm, this must be a custom implementation by the former webmaster. See, I never minded much before because when I assumed the webmaster position last August, the website design was already created and set, so I never had to change any CSS styling. However, I noticed in my log files that I got this error across multiple pages:

          # mod_fcgid: stderr: PHP Fatal error: Call to undefined function getRegInc() in: internships.php on line 6

          Looking at the internships.php (and other php pages that the log stated had this error) code, line 6 is:

          $reg = getRegInc();

          The problem is, I can’t find getRegInc() anywhere (probably explains "Call to undefined function"). $reg is used a total of three times:

          if($css!=’’)
          $reg->regCSS($css);
          if($js!=’’) {
          $reg->regJs($js);
          }

          ... [

          $reg->regInclude($js);

          So I assume it has something to do with styling. This is all a jumble to me, as I don’t understand why the former webmaster would create multiple CSS sheets and name them random strings of characters and numbers when 95-99% of the styling is the same in each sheet (only the last few lines of each CSS is different). Also, the former webmaster cannot be contacted. Sigh huh
            • 7231
            • 4,205 Posts
            In modx there are similar api functions to load CSS and JS files on the fly.
            http://wiki.modxcms.com/index.php/API:regClientCSS
            http://wiki.modxcms.com/index.php/API:regClientStartupScript

            internships.php is an external file? I think to figure this out we will need more information.

              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 3749
              • 24,544 Posts
              You should definitely look at those CSS files to make sure there’s nothing suspicious in them, but it looks like some program or snippet was creating them on the fly and using PHP to generate a guaranteed unique filename for them. I can’t think of any reason in the world why you’d need to do that, but maybe there is one.

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 17261
                • 18 Posts
                @dev_cw: What do you need to know? I did look in the modX wiki and I did see those API functions, but the call found in the code of these pages was specifically different... I tried googling it and all, just to make sure it wasn’t a third-party add-on - I get no results.

                @BobRay: I’m going to need a little help decoding it then! I know basic CSS, so the majority of each sheet I can understand. If you would like to look at the CSS sheets, I can go ahead and PM it to you. It seems like each sheet is different towards the end, and I’m not sure why that is. It’s difficult to find which CSS sheets go with which page, as it doesn’t seem to be organized at all!
                  • 22840
                  • 1,572 Posts
                  Does any part of this site pull in info content from any where else ( ie From a feed ) ??

                  I may be that the feed is also updating the CSS as part of it .......



                  Only thinking out loud
                    • 17261
                    • 18 Posts
                    Nope, the only RSS feed present anywhere on the site is on the front page of the Manager - "ModX News"  and "Security Notices".

                    Also, if it helps, I did manage to find that there is some pattern... I looked at all the files from id=100 to 160 and all of them link to the same CSS sheet, and quickly looking at id=300, 301, and 310, all of those link to the same CSS sheet as well( but different from the one linked 100-160). There are 6 CSS sheets, but we’re over 400 in page ID numbers. I’m guessing some script generates a new CSS after x documents have been made? I’m out of time for today, I’ll look into it again tomorrow. By the way, thanks for the responses guys  laugh

                    P.S. Just before I head out the door, I wanted to ask something: is there an easier way to be able to tell which pages link to a specific CSS sheet? Or generally speaking, which pages (within the same site/domain) link to another page?
                      • 20413
                      • 2,877 Posts
                      Im not sure this can help you but try http://home.snafu.de/tilman/xenulink.html
                        @hawproductions | http://mrhaw.com/

                        Infograph: MODX Advanced Install in 7 steps:
                        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower