We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    Susan, can you tell me why those requests are coming up with 500 responses? These are internal server error codes and that’s what concerns me; do you get these premature end of script headers from accessing those URL’s with a browser?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: OpenGeek at Dec 06, 2006, 11:20 AM

      Susan, can you tell me why those requests are coming up with 500 responses? These are internal server error codes and that’s what concerns me; do you get these premature end of script headers from accessing those URL’s with a browser?
      Confirmed...this is not bot only... for instance, this invalid URL http://loripsum.co.uk/templates.html?template=AqueousLghtX generates the 500 error and records it in the event log. This appears to be a problem with the template switcher? Maybe? Not sure, but any thoughts are welcome...
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Odd... if you go to the site and use the menu to access the Templates page, then click on the same link, it works fine.
          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
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: sottwell at Dec 06, 2006, 12:21 PM

          Odd... if you go to the site and use the menu to access the Templates page, then click on the same link, it works fine.
          The link is mis-spelled in my example, which came directly from those log entries with the 500 error codes. The page is found, so the problem must be in the way the template switcher is handling invalid template names.

          On the plus side, you’ll always know when bad links are pointing at your site and referring robots...
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Yes, I see the misspelling. However, if you add the www to the same thing, you get the "error retrieving template" MODx error, with one nice neat event log entry. And that 500 error definitely is what’s causing the rash of event log entries. 83 pages worth, to be exact.

            I don’t know where that misspelled link comes from, I can’t find it anywhere.

            The other links, Loripsum and Animetor, I removed a week or so ago. Do these things go looking for pages they already have?
              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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ok, it’s definitely being caused by the messageQuit() function in the TemplateSwitcher plugin. If I comment that one line out, it just reloads the page with the default template, whether there is the www or not.
                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
                • 22303 MODX Staff
                • 10,725 Posts
                Great Susan. As an aside, I’m not a big fan of messageQuit(), especially for error handling. When encountering errors, IMO, you should forward to the error_page using $modx->sendErrorPage() or define your own custom page or approach to handling the error so that an appropriate response does make it back to the client.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Well, I thought I was being clever. Actually, though, for a template switcher, the best thing is for it to just load the page in the default template if there is an error.
                    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
                    • 23478
                    • 133 Posts
                    Quote from: davidm at Dec 06, 2006, 02:37 AM

                    Please upgrade to 0.9.5 final (released today)

                    Corrected and watched everything (event all I don’t use) in RC2
                    Upgraded RC2 -> RC3
                    Upgraded RC3 -> final

                    still having 52 pages in my error log undecided

                    the only change from RC2 -> RC3 is that it appens in the evenning (still around 7:00 but PM now while it was AM before)
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      piwaille, this appears to be related to spiders crawling your site. They do this at regular intervals. In my case, it was the Inktomi search engine spider causing most of my problems, because of a bug in the TemplateSwitcher plugin (well, actually it is in the messageQuit function, but the TemplateSwitcher was calling it when it really didn’t need to). Get your error logs and your access logs for that time period, and find out what files are getting a 500 error response at that exact time. They will look like what I posted earlier.

                      Are you using the TemplateSwitcher plugin?
                        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