We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20135
    • 188 Posts
    Hi, I just this morning noticed that one of my resources was missing from the resource tree in my 2.3.1 Revo install. I added the resource about a month back, it's always shown up in the wayfinder menu on the frontend, and when I searched for the resource I could open it, edit it, save it, etc. All of the setting were the same as those resources that could bee seen in the resource tree, and there are no permissions set up on the resource. I've flushed the permissions anyway and cleared the cache, but the resource will just not show. I can create new resources without issue.

    Has anyone got any ideas?

    This question has been answered by moniarde. See the first response.

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Does the resource show up on the Search?

      Check the database for it, and make sure it has a valid parent, and is set to show in the Tree.

      BobRay's SiteCheck utility does an excellent job of detecting and fixing "orphaned" resources. It's well worth the small price he charges for it, and it's licensed per-user, not per-site, so you can use it on any site you're working on.
        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
      • discuss.answer
        • 20135
        • 188 Posts
        Yes, the resource shows up in Search, which is where I can open it for editing. I've checked the modx_site_content table and viewed that resources against others with the same parent (in this case, the parent is the context root), and there is nothing different about this resources other than the pagetitle and alias (content empty).

        I played around with it in the database for a second, and thought that maybe it had been cached somewhere incorrectly and wasn't being treated properly. I manually changed the parent id to another (not 0) and now it's shown up in the resource tree. I can now move it out of that folder and back under root, and it still displays.

        Whatever it was, it is a mystery...
          • 21671
          • 244 Posts
          I can confirm that this has happened to me with two separate resources in the same 2.31 installation inside modxcloud. I looked in phpmyadmin and the hidden resource looked the same as those that were not hidden. I applied moniarde's "fix" successfully. This is fine while I'm developing a site, but I can't had off a site to a client with this issue.

          -Noah
            • 3749
            • 24,544 Posts
            I'd be curious to know if SiteCheck would find and fix this. It will certainly detect invalid parents, but I suspect this has something to do with the ambiguity of parent = 0 in multi-context sites.

            @noahlearner: was your site multi-context as well?
              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
              • 20135
              • 188 Posts
              @BobRay Just to clarify, my site is not multi-context.

              @noahlearner We're these missing resources children of the root context, or of another resource? I'm trying to find any similarities between out missing resources that could give us a better picture of what's going on.
                • 3749
                • 24,544 Posts
                Quote from: moniarde at Aug 29, 2014, 07:14 PM
                @BobRay Just to clarify, my site is not multi-context.

                Well, that blows my theory. wink
                  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