We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29333
    • 26 Posts
    Hey there!

    I encountered 2 important snippet problems:

    1 [[WebLogin]] snippet
    If I am logged in, it appears as a "Logout" link. If I click on it, it doesn’t happen anything!! The webpage just refreshes and that is all (as if I would click the REFRESH button in my browser).

    2. [[SearchForm]] snippet
    The same problem. If I try to search something, it just refreshes the page, nothing more. It doesn’t even display a "Nothing Found" message as it should.

    What do you think ??

    The answer is "Unblocking User with role id 1" ?
      Mosh-pit rules !!!
    • I’m going to take a wild guess and bet that the page is cached. Do I win? smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 29333
        • 26 Posts
        OK... hmm.... don’t laugh but how do I make that page to be "un-cached" (if I can say so) ?
          Mosh-pit rules !!!
          • 29333
          • 26 Posts
          OK, problem solved !!! grin
            Mosh-pit rules !!!
          • I’m sure you noticed, but in case not, if you are using a snippet that you don’t want cached, like the login/logout snippet, you call it like this:
            [!MySnippet?key=value!]. Then the snippet is evaluated, even if the rest of the page is cached.
              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
              • 29333
              • 26 Posts
              You want to say that you should write exactly that?
              [!MySnippet?key=value!]


              Or I should replace MySnippet with the snippet name and value with something else??

              And this [!MySnippet?key=value!] I should write instead of calling the snippet with [[MySnippet]] ??
                Mosh-pit rules !!!
              • If you don’t want a snippet cached, like you don’t want the WebLogin snippet cached so it can say "Logout" if you’re logged in instead of displaying the form, and so it can display the login form if you log out, but you do want the page cached, you use [!....!] instead of [[.....]] Otherwise, call the snippet as you usually would. Then ModX will get the cached version of the page, but parse the snippet and replace the snippet part of the page.
                  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
                  • 29333
                  • 26 Posts
                  Thanks !!!
                    Mosh-pit rules !!!