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
    1. Do you have site_url *context* settings for the other context(s)?

    2. Is your base href tag uncached?

    <base href="[[!++site_url]]" />


    3. Are you using the &contexts property in the Login tag?

    [[Login? &contexts=`web,othercontext`]]


    TBH, I've never used Babel so I'm not sure what else to try.

    One more diagnostic thing would be to put that IsLoggedIn snippet tag on the Login page and redirect to the Login page. If the use is shown as logged in, it suggests that you're forwarding the user to another context that the user is not logged in to.
      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
      • 43899
      • 26 Posts
      #1: i'm using site_url for all contexts
      #2: changed to non-cached - no change
      #3: added &contexts property - no change. Currently using only 'web' context.

      In the meantime I've deinstalled Babel - with no change - login still not working.
      ONLY when site_url variable is removed from web context settings, then login starts working fine.
      Could you try to add site_url to one of your pages and see if you see the same behavior??

      What else can be done to debug the login scripts and see where the process falls apart?
        • 3749
        • 24,544 Posts
        It sounds like the value of your site_url setting doesn't match the URL that the user is coming in on.

        Try putting this code on the Login page (with no site_url context setting) to find out what MODX thinks the URL is:

        <p>Site URL: [[!++site_url]]
        </p>

        When you add the site_url context setting, you should see if it changes.

          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
          • 43899
          • 26 Posts
          This is what I have in my .htaccess:
          # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
          RewriteCond %{HTTP_HOST} .
          RewriteCond %{HTTP_HOST} !^mics-munich\.de [NC]
          RewriteRule (.*) http://mics-munich.de/$1 [R=301,L]


          site_url displayed http://www.mics-munich.de

          When removing the ‘www’ I get the user logged in (checked by [[!IsLoggedIn]] snippet).

          I’m now getting an error page (page cannot be displayed), but this is an authorization problem – the login is now working OK
          Thanks a lot for your valuable hints!!
            • 3109 ☆ A M B ☆
            • 894 Posts
            What method are you using for hosting multiple Contexts are you using ContextRouter or the manual setup? I think if you install ContextRouter and enable the includeWww it will solve your problems and will prevent you from having to do rewrite rules.

            If you don't know how to use ContextRouter check out my tutorial/review on how to use it.

            Good Luck.
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX