We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I'm thinking that it's a problem with your ACL entries. I think you may have created a group of users who don't have the permission to Log in to the web context.

    Users governed by Load, or Load, List, and View policies don't have the permission necessary to log in. So your "logged-in" user isn't really logged in. That's why the snippet doesn't work. So what I meant was to change the Load Only, and/or Load, List, and View policies in any ACL entries that might affect the user in the web context to the Administrator Policy.

    BTW, if you set the minimum role to Super User, the policy will affect no one but you. If you want it to affect "members" you need to set it to "Member."




    ------------------------------------------------------------------------------------------
    PLEASE, PLEASE specify the version of MODX you are using.
    MODX info for everyone: http://bobsguides.com/modx.html
      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
      • 39927
      • 46 Posts
      I'm not getting it yet, Bob. Here's what my settings are at present:

      1. User Group Access to Context:

      • Context = Web
      • Minimum Role = Member - 9999
      • Access Policy = Administrator

      2. Resource Group Access (I may have some mess ups here):

      • Resource Group = Members Only
      • Context = Web
      • Minimum Role = Member - 9999
      • Access Policy = Resource

      3. Element Category Access (I may have some mess ups here):

      • Category = Personalize
      • Context = Web
      • Minimum Role = Member - 9999
      • Access Policy = Element

      I'm afraid I'm all mixed up at this point ... information overload!
        Alan
        --------------------------------------------------------
        MODX Revolution 2.2.2-pl
        • 3749
        • 24,544 Posts
        I don't see anything wrong there, assuming that you haven't altered the permissions in the standard policies.
          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
          • 39927
          • 46 Posts
          I haven't touched any of the Access Policies or Policy Templates.

          I can't imagine what I've done to mess this up ... it works when I'm logged into the Manager but doesn't work on another browser where I act as a "stranger" until I log in. And then doesn't work when I log out.

          What could it be about being logged out that is stopping the chunk from being seen? I think *that* is the question.
            Alan
            --------------------------------------------------------
            MODX Revolution 2.2.2-pl
            • 3749
            • 24,544 Posts
            Do you, by any chance, have an index.html file in the MODX site root?

            Also, is your Login tag uncached?

            [[!Login ... ]]





            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              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
              • 39927
              • 46 Posts
              I have an index.php file in the root of the MODX folder.

              The Login tag *is* uncached and the Login page Settings have these checked: Searchable, Rich Text, Cacheable, and Empty Cache

              PS: Thank you for staying with me on this!
                Alan
                --------------------------------------------------------
                MODX Revolution 2.2.2-pl
                • 3749
                • 24,544 Posts
                Index.php is normal. Just make sure there's not also an index.html file.

                Also, make sure the Login page is not in any resource groups.

                It shouldn't be necessary, but you could try unchecking the Cacheable status of the Login page and see if it makes a difference.

                I'm afraid I'm running out of ideas. What's the action in the form tag on the Login page?

                [update] Another thought -- In a browser where you're not logged in to the Manager, go directly to the Login page and, without logging in, do a "view source" and see what the form action is for the Login form. You may need to try several browsers because some will try to submit the form for you. I use IE7 for this.

                Also, try taking out the output modifiers in your two chunks and just put a plain text message in the chunks "you are logged in" "you are not logged in". It shouldn't make any difference, but we're running out of things to try. wink




                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years, 3 months ago.]
                  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
                  • 39927
                  • 46 Posts
                  Thanks, Bob.

                  Unchecking the Cacheable status of the Login page didn't do anything.

                  Here's the form action:

                  <form class="loginLoginForm" action="index.php?id=3" method="post">


                  I don't know what you mean when you say, "try taking out the output modifiers in your two chunks" ... here's my Chunk for Guests - what is the output modifier part? :

                  <span id="logged_in_status" style="font-family: arial; font-size: 10pt">
                  You are not signed in | <a href="[[~3]]">Click Here to Sign In</a>
                  </span>
                    Alan
                    --------------------------------------------------------
                    MODX Revolution 2.2.2-pl
                    • 3749
                    • 24,544 Posts
                    I remembered seeing the output modifier:

                    [[+modx.user.id:userinfo=`fullname`]]


                    but I guess that's only in the working chunk.

                    The Login form has a Resource ID of 3, and is not in any resource groups, right?

                    BTW, I tested your exact setup (minus the security settings) and it worked fine.


                    I think the next thing to try would be to unprotect the resources by taking them out of the resource groups.

                    Be sure to clear the cache and flush permissions and then flush all sessions after every change.


                    ------------------------------------------------------------------------------------------
                    PLEASE, PLEASE specify the version of MODX you are using.
                    MODX info for everyone: http://bobsguides.com/modx.html



                      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
                    • discuss.answer
                      • 39927
                      • 46 Posts
                      Right; the Login form (id 3) is not in any resource groups.

                      Thank you so much for testing my setup! I'm relieved to know that yours worked ... that means mine *will* work, as soon as I figure out that little cog in the wheel.

                      Okay ... I took all resources out of resource groups (only 2 resources), cleared the cache, flushed permissions and flushed all sessions ... to no avail. The chunks appears after login only and does not appear before login or after log out.

                      I guess I need to go through the tutorial again, step-by-step, and cover every point. Hopefully, I'll discover my mess-up! [ed. note: alanhorvath last edited this post 14 years, 3 months ago.]
                        Alan
                        --------------------------------------------------------
                        MODX Revolution 2.2.2-pl