We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36493
    • 64 Posts
    I have two contexts the regular web and another for different domain.

    The login works for the web context but if I try to login to context b it just reloads the page without logging in???

    any Ideas? - am I missing a setting for the context?

    Environment:
    Revo 2.0.1 pl
    mysql 5.1.48 (client api version 4.1.22)
    php 5.2.13 suPHP
    apache 2.0.52
    pdo_mysql installed
    no opcode

    Many Thanks
      |
      • 36493
      • 64 Posts
      hmm? Ok I’m Now thinking It’s a permissions thing.

      I can Login with my admin account if I’m already logged into the manager.

      but If i try it from another browser (even if logged in to the web context) I still can not login to my b context

      ahrrg! I seem to go round in circles with this permission stuff

      thanks,
        |
        • 36493
        • 64 Posts
        shocked haha damn what a fool I just locked myself out of the mgr context

        yes randomly changing permission rules is not the way to go. tongue

        so how do I remove my new permission now so I can(deleted them from ’modx_access_context’) get back to stumbling around my login problem?
        wink

        This is really driving me nuts - what would stop login from working in a context???
          |
          • 3749
          • 24,544 Posts
          Do you mean the main manager login, or are you using the Login snippet?
            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
            • 36493
            • 64 Posts
            The trouble I’m having is with the Login Snippet.

            manager is working fine at the moment

            login in to my web context(using the Login snippet) works also

            but if I try to login to another context (I have two domains each pointing to different contexts using the one gateway plugin) then the page just refreshes without any errors but does not show the restricted content more declares as authenticated using ($authenticated = $modx->user->isAuthenticated($modx->context->get(’key’));)

            Many thanks
              |
              • 3749
              • 24,544 Posts
              Do you have &loginResourceId set to a published page in that context?

              Is that page protected by being in a resource group linked to a user group in a Resource Group Access ACL entry?

              If so, the user would have to be given access to that resource group.

              If not, has the user you’re logging in as been given permission for that context in general?
                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
                • 36493
                • 64 Posts
                Thanks Bobray,

                I did not have &loginResourceId in any of my Login calls. Setting it to a published resource in the context does not seem to have any affect (it will redirect to the id if logging in from another page).

                I have tested with my "member" member and Admin (which is also a super user in the user group "member").

                How do I give permissions for the context?
                  |
                  • 3749
                  • 24,544 Posts
                  Can you post the ACL entries that you added to restrict access to the pages?
                    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
                    • 36493
                    • 64 Posts
                    Sure Thanks BobRay,


                    context Access Permissions:
                    context - user group - authority - access policy

                    web, (anonymous), 9999, Load Only
                    web, Administrator, 0, Administrator

                    other, (anonymous), 9999, Load Only
                    other, Administrator, 0, Administrator


                    Created user Group ’member’
                    name: member
                    Parent: 0

                    users: admin, examplemember, etc

                    context Access: empty

                    Resource Group Access:
                    Resource Group: memberPages
                    min role: member - 9999
                    Access policy: resource
                    context: web, other
                    no category rules

                    The Resource Groups:
                    ’MemberPages’ just a few ’member’ pages in each context.

                    All access policies (Administrator, Load Only, Resource ) are the default that come with a fresh install.


                    Many thanks,
                      |
                      • 3749
                      • 24,544 Posts
                      Offhand, I don’t see anything wrong there.

                      This statement is confusing me:

                      I did not have &loginResourceId in any of my Login calls. Setting it to a published resource in the context does not seem to have any affect (it will redirect to the id if logging in from another page).

                      I don’t know what the part in parentheses means.

                      Let me throw out some general things to check/try:

                      You should have two separate login pages, one for each context, created in that context.
                      Each should redirect to a page in its own context.
                      The login snippet should always be called uncached: [[!Login]]
                      Be sure to flush permissions and sessions and clear the cache after any change.

                      If none of that helps, I would remove all the ACL entries (both Context and Resource) except the two original Context Access ACL entries for the Admin to the mgr and web contexts (you can leave all the groups and the extra context). Then flush permissions, clear the cache and your browser cache/cookies, then flush sessions. That should leave your other context and its pages completely unprotected in the front end. If you still have the problem, it’s not a permissions problem. If the problem is gone, you can test as you add each ACL entry to see when things go south.

                        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