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

    All users except the admin are no longer able to move (drag and drop) resources from one parent to another without getting the following error:
    - "An error occurred while trying to save the resource."
    If an user changes the 'Parent Resource:' field, it works fine.
    I duplicated an Access Policy and tick all the boxes, than give the new AP to an user and login but still wouldn't be able to drag and drop resources around properly(???)

    Any suggestions please?
    Thank you.
      • 3749
      • 24,544 Posts
      What version of MODX?

      Did you flush permissions and sessions after creating the policy?

      What policy template is the new policy based on?

        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
        • 15392
        • 61 Posts
        Yes, I even flush all my neighbours toilets just to be sure!
        My Version is 2.1.3-pl (advanced), the copy is based on the editor content.
        I mean, I'm greener than Ireland with Modx, but if it's a permission issue, than would they still be able to change parents with the 'Parent Resource' directly on the page?
        Thanks so much for this.
          • 3749
          • 24,544 Posts
          It does sound like it might be a bug in MODX. Could you report it here? http://bugs.modx.com/
            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
            I'm having the same issue. I'm wondering if the drag and drop is connected to another permission I've not included in the policy. I have policies based on custom templates duplicated from the Admin policy, and the custom templates have some permission removed. I'm thinking I've removed a permission that doesn't seem to be connected to the drag-n-drop, but actually is.

            Otherwise, it's a bug, I've listed it here: http://bugs.modx.com/issues/6016 [ed. note: moniarde last edited this post 14 years, 11 months ago.]
              • 3749
              • 24,544 Posts
              I don't know if this is related to your issue, but other users have reported that with drag-and-drop, it's possible to make a resource be its own parent. That could cause all kinds of trouble.

              You could use PhpMyAdmin to look in the modx_site_content table. the id field should never be the same as the parent field.

                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
                • 15392
                • 61 Posts
                This issue does not only occur one resource but for all the resources of the tree.
                  • 3749
                  • 24,544 Posts
                  I believe that if one resource is set as its own parent, the tree no longer functions, so it may be worth checking. OTOH, it may just be a bug. 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
                    • 15392
                    • 61 Posts
                    Would that not be:

                    "SELECT *
                    FROM `modx_site_content`
                    WHERE id = parent"

                    From phpmyadmin?

                    Its returning an empty result in my case.
                      • 3749
                      • 24,544 Posts
                      I think so.

                      If it's not a bug (and it might be), I'd suspect a problem with the policies assigned to them.

                      To diagnose that, you could assign them a policy in their Context Access ACL entry for the 'mgr' context based on the Administrator Policy Template with all permissions checked. If that fixes it, it's a problem with the Context Access ACL policy. You can uncheck the permissions a few at a time to see which one is the problem. Don't forget to flush permissions and sessions after making each change.

                      If that doesn't fix it, the problem is in the Resource Group Access policy that gives them access to those resources. Leave them with the Administrator policy (all permissions checked) in the Context Access ACL entry. In the Resource Group Access ACL entry, give them a policy based on the Resource Policy Template with all permissions checked (again flushing permissions and sessions). If that doesn't fix it, it's a bug. If it does, you can try the procedure above to see which permission is the culprit.
                        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