We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29517
    • 40 Posts
    I was trying to set up an admin login that could only access one page of the site. Part of that process involved setting up Resource Groups. In the Resource Group screen where you can drag pages from the right half of the window into the appropriate Resource Group on the left, I accidentally dragged a folder from the left half into the right.

    That folder then disappeared from both halves and upon refresh, also disappeared from the site tree. I figured I'd remove the resource groups and start over, but no luck. I then removed all user groups, flushed this, cleared that, and got it back to a single default Administrator access with all its default settings.

    Unfortunately, the folder and all the resources within it are still missing from both the web and the manager ends. However, when I perform a Site>Search on any of the missing page titles, it turns up in the search results, and the resource is still editable and saveable. The pages are still accessible via the frontend using their direct URLs but they don't appear in any menus as Wayfinder can't see them.

    Any help getting these pages visible in the site tree again would be appreciated!

    [ed. note: terobot last edited this post 11 years, 2 months ago.]
      Creative Director - Throwstone Web Design Melbourne
      • 3749
      • 24,544 Posts
      Assuming that you've deleted all Resource Groups and all Resource Group Access ACL entries, my best guess is that the Resources now have an invalid parent or belong to resource groups that no longer exist (neither is supposed to be possible, but I know they happen). I know the first one will keep resources from showing in the tree. I'm not sure about the second.

      If it's the first one, you can edit the modx_site_content table in PhpMyAdmin and set the parent for those resources to 0. That will put them at the root of the tree and they should show up again.

      For the second, you'd have to edit the modx_document_groups table. If there are no resource groups on the site, the table should be empty. Deleting any entries might bring the documents back.

      I would back up the database first, just in case. In PhpMyAdmin, click on the database name at the very top over the grid so all tables are showing. Then select Export on the PhpAdmin top menu. That will create a .sql file for the whole database. If things go wrong, you can restore the database by selecting Import and then selecting that file.
        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
        • 29517
        • 40 Posts
        Perfect solution! In the modx_site_content table, the container of the missing resources had an invalid parent. It somehow had its own ID as the parent ID. I changed the parent ID back to 0 and everything is fixed.

        Thanks for your help. It's made my weekend a lot more enjoyable! Now it's time to go back to your guides and figure out how to create this admin user. Hopefully I don't screw things up second time around. Seriously, it was so much easier in Evo!
          Creative Director - Throwstone Web Design Melbourne
          • 3749
          • 24,544 Posts
          I'm glad that worked for you. I've heard reports before about docs being their own parents, but couldn't figure out how it might happen. Can you give a little more detail about exactly what you did so it could be reproduced?
            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
            • 29517
            • 40 Posts
            Sure thing. On the Resource Groups page (see attached screenshot) I was attempting to create two resource groups - one that contained all the pages in the site named All Pages, and another group named Hospitality Pages that only contained the resources within the Hospitality container.

            Problem is, the Hospitality folder/container is a child item within the Learning & Teaching folder. So I wasn't sure whether granting a user access only to the Hospitality Pages resource group would work if they didn't also have access to its parent folder.

            By the way, in the attachment, the Hospitality resource (150) appears as a Weblink because I've since moved the Hospitality folder into a top level position, hidden it from menus, then pointed the Hospitality Weblink to it. That's the only way I could get around the problem I described in the previous paragraph of granting access to the Hospitality folder without allowing access to its parent folder.

            Anyway, I started off by dragging the Learning & Teaching folder (2) from the right side of the screen into the Hospitality Pages resource group on the left. Then I decided that wasn't what I really wanted so I right clicked on the Learning & Teaching folder on the left hoping for a pop up menu. But nothing appeared. So I dragged the Learning & Teaching folder back from the left to the right. I could see the little "no entry" icon pop up as I dragged this folder over various positions in the right side of the screen. I simply dropped the folder at the position where I thought it should go assuming this would remove it from the resource group.

            And it did. But upon refresh of the Resource Group tree and the main Resource tree, the Learning & Teaching folder and all its child resources were nowhere to be found. I'm assuming at this point the parent ID of the Learning & Teaching folder was changed from 0 to 2.

            Hope this helps!
              Creative Director - Throwstone Web Design Melbourne
              • 3749
              • 24,544 Posts
              Thanks! smiley
                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