We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14956
    • 7 Posts
    I have installed MODx locally using XAMPP and also on my actual hosting server - Both do the same. I’m using the latest version of MODx Evolution.

    I have a simple page setup for this test:

    [*content*]
    [[WebLogin]]
    


    When I try to login, it doesn’t do anything. What am I doing wrong?

    Side note, if I save the page in the Manager, then refresh it: It shows the "Logout" button. If I click that button, it doesn’t do anything.
    Could this have something to do with the cache? Or my page setup?

    joshpresley.com
    user: josh
    password: modx123
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The problem is that your page is being cached after the snippet is first run (displaying the form). Now, when the page is requested again as the result of the form submit, the page is taken from cache, with the form already inserted, and there’s nothing there to process the POST values from the submission.

      You must use the uncached form for snippets that are dynamic (need to change between page requests):
      [!WebLogin!]

      This way the snippet isn’t evaluated until after the page has been retrieved from cache, so now it will process the POST as expected.

      The other way to deal with this is to clear the "Cacheable" checkbox in the resource’s Settings tab. But simply using uncached snippet tags for forms and any other snippets that must change between page requests is the best way to do it.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 14956
        • 7 Posts
        Odd, using my local machine as a server, I could uncheck the Cacheable option and it didn’t change anything. I will try your other suggestion.
        I don’t guess I checked that on the actual server because unchecking the ’Cacheable’ option fixed it. <- My Bad
        Thanks SO much for your help sottwell!