We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37308
    • 8 Posts
    Hello,

    I setup MODx for my client awhile ago. She's been using it fine for months with no problems. She has an intern that started making updates and I *think* she may have broke something.

    I logged in to find that the tree page navigation that is usually in the left-hand sidebar has been replaced by an house icon with the word "web." (see screenshot).

    The intern says:

    I was able to type in and edit the different parts of the site (press, where to buy, etc.) but then it wouldn't allow me to save. Since then, I cannot even access that part of the program to edit things, it just says that the configuration is incorrect.

    Any help would be appreciated.

    Thank you,
    - Jess
      • 3749
      • 24,544 Posts
      Jess, first, have the user click on the "house" icon to see if it expands to show the resources.

      Next, check whether they modified or deleted any Context Access ACL entries or changed the tree_root_id setting. They might also have put all the web resources into a resource group and connected it to a user group they don't belong to.


        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
        • 37308
        • 8 Posts
        Bob, thank you very much for your help. I've looked into the areas you mentioned. This is what I found:



        • The house icon does not expand the resources, it brings me to a page (screenshot attached) that says "The default front-end context for your web site."

          The tree root ID is 0 (is that what it's supposed to be?) - I can't remember

          It doesn't look like there are any resource groups (screenshot attached)

          As for the Context Access ACL entries, I'm not 100% sure where to find this. I might be getting it confused with the "Context" section and the "Resource Group Entries. (I was reading your response to a post over here: https://forums.modx.com/thread/44099/modx-revo-permissions-how-to-limit-a-editor-to-manage-only-a-group-of-files). I've attached a screenshot of the "Context" screen if it's of any help.
          • 3749
          • 24,544 Posts
          Jess, go to Security -> Access Controls -> User Groups tab.

          Right-click on the group the user belongs to and select "Update User Group."

          Select the "Context Access" tab to see what ACL entries exist for the group. One should have a context of 'web' and that entry should have a policy that has the 'list' permission enabled.
            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
            • 37308
            • 8 Posts
            Ok, great I found it thanks. There are six "mgr" contexts and six "web" contexts. Does it matter which "web" context item I set to "load, list and view?" The access policy for all are "administrator."
              • 3749
              • 24,544 Posts
              Jess, that's just nuts.

              For a given user group, there should only be one Context Access ACL entry for each context (unless the extra ones are for different roles -- and yours aren't). They all use the same role and policy so they're completely redundant.

              IOW, delete all of them except two. Keep the first 'web' one and the first 'mgr' one -- toss the rest. Clear the cache, flush permissions and flush all sessions.

              See if that solves the problem, though it makes me wonder if some other goofy permissions might be set up or if the Administrator policy has been altered (it should have *all* permissions checked) or if the Administrator template has had permissions removed (never do that).

              I generally deny the access_permissions permission for users other than me, especially low-level users, so they can't mess with the permissions system (or lock me out of the site).
                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
                • 37308
                • 8 Posts
                Thank you Bob. I did as you suggested and I still don't see the page navigation anywhere. Actually now the site is down too (http://www.morriskitchen.com) but I did not check to see if it was up before I made these updates.

                I'm looking back in the error logs and as far back as September 26th I can see errors saying "Table './db30351_morriskitchen/site_content' is marked as crashed and should be repaired"

                I'm not sure what to do at this point - I'm not sure if the site has been wiped out or if I continue to try and resolve the current problem everything will resolve itself.
                  • 37308
                  • 8 Posts
                  I Googled "site_content' is marked as crashed and should be repaired" and came across this blog post on the MODx forums: https://forums.modx.com/index.php?topic=49992

                  Then I looked back to see if Media Template did any upgrades to PHP or MySQL recently. According to the email, beginning August 1st:

                  We will be performing scheduled maintenance for the full upgrading of MySQL on (gs) Grid-Service Clusters.01-03. This upgrade will bring all MySQL 4 accounts up to MySQL version 5.032. We will be upgrading a portion of all three Clusters each day (excluding weekends) until all services have been updated.

                  Could the issue actually be the MySQL upgrade crashing the content tables?
                    • 3749
                    • 24,544 Posts
                    It seems unlikely, but I guess it's possible, especially if people were accessing the site during the upgrade. Tables do crash from time to time, though, and the crashed table is almost certainly the cause of the problem.

                    First, flush all sessions and don't log back in.

                    Using cPanel (or whatever admin panel your host provides), go into PhpMyAdmin. Select the database used by the modx install. You should be able to select the modx_site_content table and have it repaired.

                    While you're there, check for other tables that might need repair (that might explain the multiple ACL entries if no one created them).

                    Hopefully, you have a recent backup of the site in case the repair doesn't work or causes the loss of some resources. It's possible to restore just that table from the backup, but try the repair first.

                    After the repair, delete all the files in the core/config directory before trying to access the site.
                      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
                      • 37308
                      • 8 Posts
                      Ha, just tried to hard code it and that's not working either. Appears there is still an issue. So close!