We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10999
    • 6 Posts
    Hi everyone. I’m new to ModX and I’m taking Revolution 2.0.8-pl (traditional) out for a spin. I’m working on Windows 7 with a new version of WAMP. I installed the Sample Site package and worked through a few small issues with friendly urls and also the Archivist snippet warning on the following line any time a non-cached page was loaded:
    $resourceArray['month_name_abbr'] = strftime('%h',$dateObj); 


    I fixed that issue by prepend the line with @ in my Archivist snippet.

    But then I turned my attention to the non-functioning login box and what I found seems to be deeper than just tweaking a snippet. The login box snippet for the sample site uses a line like:

    $authenticated = $modx->user->isAuthenticated($modx->context->get('key'));


    This code looks correct but it doesn’t work. I checked out the code for isAuthenticated() and see it’s looking for ’webValidated’ in $_SESSION. I’ve inspected $_SESSION and never saw a "webValidated" key set even when a user was logged in. I did see "mgrValidated". Is this because I had to log in using the login form at /manager? The login form on the sample site doesn’t seem to work. Does ModX treat mgr and web as different contexts?

    Also what is the problem with the sample site’s login form? It seems to just post back to the current page but with no apparent result.




      • 10999
      • 6 Posts
      Of course it turns out that after I finally post about my issue I figure it out. I didn’t have the Login package installed.

      As an aside it might be nice to have the option to have dependencies automatically installed when packages are installed. And/Or maybe warn more if a dependency isn’t met. Anyway I’m glad to have my issue resolved and get back to testing it out.