We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36605
    • 70 Posts
    Ok, so I’m still somewhat new to ModX (I pretty much understand what’s needed ’cept creating and using my own TVs). Now I had a snippet call for reg. weblogin before, but I switched it WebLoginPE. For some reason now whenever I go to log-in or log-out, nothing happens. I have no idea as to why. I’m on bluehost, here’s my call:
    [[WebLoginPE? &type=`simple` &loginFormTpl=`loginpe` &successTpl=`welcome_template` &liHomeId=`1` &loHomeId=`1` ]]


    You guys have any idea of what’s wrong with it? Is it the templates I made? I just pretty much copied, pasted, and took out sections I didn’t want (or felt safe deleting).

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Ok, rule #2 of snippet use: Any time it’s interactive you have to call it uncached:
      [!WebLoginPE? &type=`simple` &loginFormTpl=`loginpe` &successTpl=`welcome_template` &liHomeId=`1` &loHomeId=`1` !]

      What happens is that the first time the page is requested, it displays the form, the whole page is cached, so when the form is submitted the page is requested again, only it is taken from cache instead of being processed, so the snippet is never run again to process the POST values.

      When a snippet is called uncached the page is taken from cache, but the snippet is run again anyway, and its output added to the page.

      And what is rule #1, you may ask? Use backticks `...` instead of quote marks ’...’ on the snippet parameter values. grin
        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
        • 36605
        • 70 Posts
        hmm...So what do I have to do to make it uncached? I’m sorta confused cuz I was using the back ticks like you said... huh
          • 28033
          • 925 Posts
          Quote from: latedude32 at Jan 19, 2008, 06:43 PM

          hmm...So what do I have to do to make it uncached? I’m sorta confused cuz I was using the back ticks like you said... huh

          Change the inside [ and ] to !. That forces MODx to call the snippet uncached.
            My Snippets
            -> PopUpChunk v1.0
            • 20289
            • 958 Posts
            @latedude32
            I think Sottwell has forgot to mention the rule #0!  grin
            Always Check for the differences in the code tags mentioned!
            see any difference b/w the code you mentioned and the one sottwell did?  wink
              [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
              [td][Wiki] [Persian support forum]
              [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
              [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
              • 36605
              • 70 Posts
              hah, now I do. Thanks guys, but I’m stil having a few probs... In Firefox it’s still not working correctly for logging-out and sometimes logging in...Also, when it does work it loads the chunk just saying "welcome back" and then loads again to say "Welcome Back [[user]] (or watever the actual thing is, i forget at the sec)".

              Got any tips?
                • 20289
                • 958 Posts
                Quote from: latedude32 at Jan 22, 2008, 09:00 PM

                hah, now I do. Thanks guys, but I’m stil having a few probs... In Firefox it’s still not working correctly for logging-out and sometimes logging in...Also, when it does work it loads the chunk just saying "welcome back" and then loads again to say "Welcome Back [[user]] (or watever the actual thing is, i forget at the sec)".

                Got any tips?

                Didn’t face it but it might be FF’s cache thing!, try to ctrl+shift+del (so you make sure that the cache is clear) before refreshing the page.
                  [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                  [td][Wiki] [Persian support forum]
                  [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                  [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                  • 28033
                  • 925 Posts
                  Quote from: MotSmart at Jan 22, 2008, 09:07 PM

                  Quote from: latedude32 at Jan 22, 2008, 09:00 PM

                  hah, now I do. Thanks guys, but I’m stil having a few probs... In Firefox it’s still not working correctly for logging-out and sometimes logging in...Also, when it does work it loads the chunk just saying "welcome back" and then loads again to say "Welcome Back [[user]] (or watever the actual thing is, i forget at the sec)".

                  Got any tips?

                  Didn’t face it but it might be FF’s cache thing!, try to ctrl+shift+del (so you make sure that the cache is clear) before refreshing the page.

                  IIRC, doesn’t Ctrl+F5 also "clean" out the cache and forces the browser to load the page as a blank slate?
                    My Snippets
                    -> PopUpChunk v1.0
                    • 20289
                    • 958 Posts
                    Quote from: Soshite at Jan 23, 2008, 06:28 AM

                    IIRC, doesn’t Ctrl+F5 also "clean" out the cache and forces the browser to load the page as a blank slate?

                    Well, as of personal experience it doesn’t, even with the cache storage set to 0mb!, found it out a seconds before getting mad in a middle of testing some Js & CSS results! :-]
                      [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                      [td][Wiki] [Persian support forum]
                      [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                      [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                      • 36605
                      • 70 Posts
                      hmm, so how do I go about getting it to work? Because it’s been very annoying for me to try and debug this site with that going on.