We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48586
    • 78 Posts
    This has happened to me several times now on a new site I am working on. I create a resource, and everything is great for a couple days, then it just starts displaying as my 404 page no matter what template I choose. If I change the alias, then it will display correctly. I have cleared cache from the admin, and deleted my cache folder, but these don't fix the issue. Has anyone seen this happen before? Any ideas on how to fix? Thank you very much
      • 3749
      • 24,544 Posts
      I'm not clear on which of these you're saying:

      1. When you try to look at that resource, you are forwarded to the site's 404 page.

      2. When you enter a non-existent URL, you get forwarded to that resource.

      3. The content of that resource is OK when you view it, but it uses the template of the 404 page.

      4. Something else.
        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
        • 48586
        • 78 Posts
        Quote from: BobRay at Dec 27, 2016, 12:23 PM
        I'm not clear on which of these you're saying:

        1. When you try to look at that resource, you are forwarded to the site's 404 page.

        2. When you enter a non-existent URL, you get forwarded to that resource.

        3. The content of that resource is OK when you view it, but it uses the template of the 404 page.

        4. Something else.

        When I go to "http://www.example.com/support/" I get the modx default error resource from the system settings, even though it is a valid url. I don't even get the content of the page. If I change the alias in my resource to "http://www.example.com/support-articles/" or something like that, then the page displays correctly. This has happened to me before on this site, but I just changed the alias and moved on, however that solution may not work in the future if this comes up again, which it may since I've experienced it several times already.
          • 3749
          • 24,544 Posts
          If it happens right after you add the first child page under it, it could be the container_suffix setting since the page is now a container.

          When you want to link to a page internally, be sure to always use a link tag rather than an actual URL. So in MODX revolution if the support page has the ID 12, a link to it would look like this:

          <a href="[[~12]]">Support Page</a>


          That way, MODX will (hopefully) create the correct link for you based on the resource's alias and current settings.
            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