We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • @atmmarketing I would suggest trying to export your working ACL templates and then import them to broken site. Or export all from both sites and do a diff(http://prettydiff.com/) on them to see what is missing. I would guess that there is a missing perm on something.
      • 3749
      • 24,544 Posts
      It does sound like something is broken (as you suggested). Double check the ACL entries for the anonymous User Group. Check the policy or Policies involved (Should be Load -- or Load, List, and View for everything). Then look at the permissions on the specific Policies themselves to make sure there aren't any permissions that shouldn't be present.

      It's possible (though frankly it seems unlikely) that you have one or more corrupted files in your MODX install. It's common if you upload them individually with FTP, though usually, that breaks things in a much more obvious way.

        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
        • 38787
        • 74 Posts
        Thanks for the suggestions @jgulledge19, @BobRay, I'll give those a try.

        @BobRay, don't forget this problem exhibits on both the live site and the development server. On both of these, MODX updates are applied by unzipping the files directly into the web root, and not via individual upload. On the dev server, the MODX update file is downloaded directly via WGET.

        I did notice that 2.3.5 was just released, I really wish there was a mailing list I could get on to be immediately notified of these :-(
        I might try updating to 2.3.5, I'm not holding out hope though, and sometimes MODX updates can break the Articles extension.
          • 38787
          • 74 Posts
          Quote from: BobRay at Jun 25, 2015, 03:34 AM

          3. Flush everything and try to view that resource in the front end without logging in and/or after logging in as a user who is not a member of the Administrator group. You should get forwarded to the site_start page.

          @BobRay I just followed your instructions again with both sites open side by side to make sure the steps were identical. The result: the clean MODX install shows its allocated 404 page, the 'broken' site shows the 'protected' page in its entirety. :-(

          I will now attempt to export the ACLs for comparison.
            • 38787
            • 74 Posts
            Quote from: jgulledge19 at Jun 26, 2015, 04:04 PM
            @atmmarketing I would suggest trying to export your working ACL templates

            I exported both the Resource Access Policy and the Policy Template and the files are identical across both websites.
              • 38787
              • 74 Posts
              Also, updated to MODX 2.3.5 – the problem persists.
                • 38787
                • 74 Posts
                Also, uninstalled all Extras, problem still persists.

                AdvSearch
                breadcrumbs
                formit
                gallery
                getpage
                login
                personalize
                pthumb
                quip
                resizer
                revossl
                simplesearch
                taglister
                tinymce
                firstchildredirect
                articles
                wayfinder
                  • 3749
                  • 24,544 Posts
                  Are the users' group memberships the same in both sites -- especially the (anonymous) user?

                  The only thing I can think of is that MODX somehow thinks it's running in CLI mode. In that case no permissions are enforced. I can't imagine how that could happen, though. Otherwise, I'm stumped.

                  Since we're grasping at straws, you might create a fresh install on the same server where you have the problem and see if it still happens. I dimly recall someone with a similar problem who solved it by starting over with a fresh install of MODX.
                    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
                    • 38787
                    • 74 Posts
                    BobRay, sorry for the late reply, this notification got swamped in with the rest of my email.

                    The (anonymous) group has no access to any Resource Groups.

                    How do I tell if MODX is running in CLI mode? Is there a specific line of PHP code that triggers it?

                    I do have a separate copy of MODX 2.3.3 running on the same development server and as I've mentioned, the ACLs seem to work fine.

                    'Starting over' seems like a long road to walk right now. It's not exactly a small website and there are lots of snippets and chunks that would need transferring, I'd never be 100% confident that everything was brought across.

                    Quote from: BobRay at Jun 29, 2015, 05:49 AM
                    Are the users' group memberships the same in both sites -- especially the (anonymous) user?

                    The only thing I can think of is that MODX somehow thinks it's running in CLI mode. In that case no permissions are enforced. I can't imagine how that could happen, though. Otherwise, I'm stumped.

                    Since we're grasping at straws, you might create a fresh install on the same server where you have the problem and see if it still happens. I dimly recall someone with a similar problem who solved it by starting over with a fresh install of MODX.
                      • 3749
                      • 24,544 Posts
                      How do I tell if MODX is running in CLI mode? Is there a specific line of PHP code that triggers it?

                      It's decided by PHP at some point early in the request. What you really care about, is whether MODX thinks it's in CLI mode. You should be able to check both with a snippet like this (untested):

                      $output = '';
                      
                      if (php_sapi_name() == 'cli') {
                          $output .= '<br />PHP is in cli mode';
                      } else {
                          $output .= '<br />PHP is NOT in cli mode';
                      }
                      
                      if (XPDO_CLI_MODE) {
                          $output .= '<br />MODX is in cli mode';
                      } else {
                          $output .= '<br />MODX is NOT in cli mode';
                      }
                      
                      return $output;


                      I'll be really surprised if either one comes back as cli mode, but it's worth checking.
                        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