We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22019
    • 390 Posts
    Using 2.04pl-2

    I’ve created a couple of extra contexts to use with subdomains. Actually, to be strictly correct, I duplicated them. I have edited the context settings fine.

    When I try to apply access controls, I get sent into a never-ending save loop. For example, I tried to apply the same access control as for Administrator in web. Then when I clear the cache I see this message:
    Principal 1 does not have permission to load object of class modContext with primary key:


    and then it disappears from the Resource tree. The permission has been saved (I can see it in the User Groups permissions), but I can no longer see the context when I try, for example, to give the anonymous user Load access to that context.

    Unfortunately, I then did two things - so not sure which worked:
    1. I manually created a record in modx_access_context for the anonymous user with load permission
    2. I flushed all sessions.

    And then the new context(s) re-appear in the resource tree.

    Is this the expected behaviour, or is it a bug (not being able to see it while logged in as administrator seems wrong....)?

      Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
      • 22629
      • 194 Posts
      From my own experience, if the permissions you’re editing affect the user you’re logged in as while editing them, you have to Flush Permissions (or Flush Sessions and re-login again.)
        Andy Shellam | www.networkmail.eu | @Pandy06269 @NetworkMail

        modx Revolution 2.2.6
        Windows 2012 | IIS 8 | php 5.4.11 | MySQL 5.5.29

        Content-Managed Websites Built on MODX