We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30731
    • 4 Posts
    I am having a problem with the error dovument 404... the redirect seems to be working but the page it is drawing is blank

    I have friendly urls on and they are working just fine.
    However if I put in a url that does not exist -- friendly or not -- I get sent to a blank page?

    The configuration check has the following messages ( see below) but as far as I can tell these settings are correct and the pages are published...

    My expectation is that a request for a Friendly URL or to any page that does exist should get picked up by the .htaccess file and be redirected by ErrorDocument 404 /index.php to my default index page. Instead I am getting a blank page....

    http://ubetc.org = home
    http://ubetc.org/nopage = nonexistent friendly url that should go home



    ___________

    Configuration warning: ’The Unauthorized page defined in the site configuration settings is not published.’

    What does this mean?
    This means that your Unauthorized page is inaccessible to the general public. Publish the page or make sure it is assigned to an existing document in your site tree in the Tools > Configuration menu.

    Configuration warning: ’Your site’s Error page is not published or does not exist.’

    What does this mean?
    This means that your Error page is inaccessible to the general public. Publish the page or make sure it is assigned to an existing document in your site tree in the Tools > Configuration menu.
      • 20289
      • 958 Posts
      Make sure that 404 page is assigned to be accessable by "All Document Groups (Public)" not just for admins, etc... that needs extra access permissions.
        [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
        [td][Wiki] [Persian support forum]
        [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
        [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: tslomka at Sep 28, 2007, 01:04 PM

        I am having a problem with the error dovument 404... the redirect seems to be working but the page it is drawing is blank
        ...
        However if I put in a url that does not exist -- friendly or not -- I get sent to a blank page?
        As noted in the errors, the pages you have specified in the system settings for error_page and unauthorized_page are pointing to documents that have not been published and so you get a blank result. This is the meaning of the configuration warnings.

        Quote from: tslomka at Sep 28, 2007, 01:04 PM

        My expectation is that a request for a Friendly URL or to any page that does exist should get picked up by the .htaccess file and be redirected by ErrorDocument 404 /index.php to my default index page. Instead I am getting a blank page....

        http://ubetc.org = home
        http://ubetc.org/nopage = nonexistent friendly url that should go home
        It does not use the ErrorDocument 404 /index.php -- MODx handles these internally since it has to check all of the virtual URLs that are valid before an error can be determined. As the warnings say, just make sure you have created a document in MODx, that is published and publicly accessible, and set the indicated configuration settings to that document id. If you want all 404’s to go to the site_start page, use the same document id as that setting.
          • 30731
          • 4 Posts

          It does not use the ErrorDocument 404 /index.php -- MODx handles these internally since it has to check all of the virtual URLs that are valid before an error can be determined. As the warnings say, just make sure you have created a document in MODx, that is published and publicly accessible, and set the indicated configuration settings to that document id. If you want all 404’s to go to the site_start page, use the same document id as that setting.

          Thanks... I got my head around that and solved the 404 problems I had... except for one.... This scheme seems to only allow one 404 error to to be replied to. How can I set multiple 404 errors? Typically I would process the 404 with a regEx to redirect it to the correct URL. How does ModX deal with that?
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: tslomka at Oct 01, 2007, 09:40 AM

            Thanks... I got my head around that and solved the 404 problems I had... except for one.... This scheme seems to only allow one 404 error to to be replied to. How can I set multiple 404 errors? Typically I would process the 404 with a regEx to redirect it to the correct URL. How does ModX deal with that?
            I guess I don’t understand what you are asking. How can you process a 404 response? Are you talking about using a Fx plugin to have your browser redirect to another page using regEx when you get a 404 response? Or do you mean, instead of sending a 404, you want to 301 redirect any bad requests to close or "fuzzy" matches? If the latter, you can use the OnDocumentNotFound event to attach a plugin.