We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36788
    • 75 Posts
    Hi I have 2 contexts and need to set one page as 404 error page for both (without having to use redirects or links or anything else).
    As I can see the page is working only within the context its placed. Can't get the logic of this behavior as 404 page id is unique for any context.

    May be I missed something? [ed. note: sladdals last edited this post 12 years, 10 months ago.]
      • 3749
      • 24,544 Posts
      Is the 404 page published and not protected by any ACL entries?

      Do all users have a Context Access ACL entry giving them access to each front-end context?

      Have you tried creating a weblink or symlink for the page in the other contexts?
        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
        • 36788
        • 75 Posts
        The page is published and do not protected.

        Weblink opens the page from any context, symlink works only within the same context.

        Keeping the error page in one context, then creating the Weblink in another and setting the Weblink as a custom error page setting for this context do not solve the issue. The custom context error setting seems to be overriden by system error_page setting.


          • 6437
          • 157 Posts
          I believe there's a setting to make symlinks work across contexts.

          Steve
            • 36788
            • 75 Posts
            I think error page should work across all contexts without having to set symlinks or weblink. It is just the page and as every page It has a unique id and could be accesed from any context.
              • 3749
              • 24,544 Posts
              Are your error and unauthorized pages in the web context?

              Do all users, including the (anonymous) user, have a Context Access ACL entry giving them access to *all* front-end contexts?
                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
                • 36788
                • 75 Posts
                Quote from: BobRay at Nov 26, 2013, 01:06 PM
                Are your error and unauthorized pages in the web context?

                Do all users, including the (anonymous) user, have a Context Access ACL entry giving them access to *all* front-end contexts?

                Yes, both pages are in web contexts. And both (web and catalog) contexts have load only access for anonymous users.

                I don't think that the problem is with the access polices. If I set the custom error_page in catalog configuration using id from this context this page will appear in case of wrong url. Another option is to simply move the current error page from web to catalog context the page will work in catalog context well. Though in this case the error page will not work for web context.

                  • 3749
                  • 24,544 Posts
                  I think the problem is that when a resource isn't found during the request process, MODX calls the context object's makeUrl() method and the context object doesn't know about resources in any other Context.

                  I think I would just have two identical 404 pages, one in each context.
                    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