We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9241
    • 42 Posts
    We currently have a modx revolution installation (version 2.2.0-pl2) in which we have picked up something strange.

    The website has lots of static resources (hundreds of them), all which are assigned to certain resource groups for access control and security to hundreds of different users. I loaded all the document using a script (or snippet) to create all the resources. Everything worked fine, until I've added some more static resources, where it stopped working. Stopped working in the sense that modx does not output anything on any page.

    When marking some of the documents (or static resources) as deleted, it then displays the site again. Once I undelete one document, it throws the error again.

    Is there possibly some limit of static resources?
      • 22303 MODX Staff
      • 10,725 Posts
      If you have protected hundreds of (any kind of) Resources with policies for hundreds of different user groups each, you may be experiencing issues with the size of your session data, since all of those policies will be stored in a session. But without more details of your security model, it is hard to say exactly what is happening. You can disable "Check Resource Group Access" in your System Settings (or in the web Context, create a setting called access_resource_group_enabled and set it with a value of 0) to test if this is the issue.
        • 9241
        • 42 Posts
        Security isn't that complex actually...

        We have 3 user groups (and resource groups), Administrators, Members and Registered. Each is linked accordingly to resource groups with the same names.

        Now some of the document are linked to Members and Administrators, why others are visible to all three, but for most static resources are linked to Members and Administrators and a few to Registered as well.

        Registered are users who are just registered on the website, Members are for people whom have gone through a membership/subscription process who are now "active" Members. Administrators are manually setup to give access to administrative functions like membership management, invoicing and other business processes.

        Hope that makes sense, and not sure if it's the best route to take with regards to security setup, but the idea works fairly flawlessly, except for the current problem with the site not displaying anything.

        I've disabled the "Check Resource Group Access" in the System Settings, and everything loaded perfectly without a hitch, I take it, it must be the policies that are stored in the session then?
          • 22303 MODX Staff
          • 10,725 Posts
          It doesn't sound like too many policies for the session to handle. But it does sound like you are restricting access to something that is preventing the site from rendering. I just have no idea what and it would be very hard for someone to know the specific dependency without more intimate knowledge of your site policies, snippets, etc.
            • 9241
            • 42 Posts
            Sent you a PM with some more details about the website.
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: EvoBunny at Aug 13, 2012, 04:02 PM
              Sent you a PM with some more details about the website.
              FWIW, I don't provide support via PM. It would be best if you continued to explore the issue in this thread.
                • 9241
                • 42 Posts
                No problem, thanks anyways, decided to remove the security on all the static resources and just apply security on the pages with the links and now it seems to be working. It's a short term solution because if you have the link you'll still be able to access the static resources though, which isn't ideal, but the average person using the site would not know this anyways.

                Just sent the PM to try and help to explain how the security was setup, but it's not that important anymore I guess.

                The problem still exists though that if you have hundred of resources linked to various resource groups something causes any resource to fail rendering.
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: EvoBunny at Aug 14, 2012, 08:37 AM
                  No problem, thanks anyways, decided to remove the security on all the static resources and just apply security on the pages with the links and now it seems to be working. It's a short term solution because if you have the link you'll still be able to access the static resources though, which isn't ideal, but the average person using the site would not know this anyways.

                  Just sent the PM to try and help to explain how the security was setup, but it's not that important anymore I guess.

                  The problem still exists though that if you have hundred of resources linked to various resource groups something causes any resource to fail rendering.
                  The idea of static resources is to put the files at locations not accessible directly by the web server. Then the only way to access them is via the URI of the static resource.
                    • 9241
                    • 42 Posts
                    Ok, will keep that in mind.