We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28033
    • 925 Posts
    &liHomeId

    If I don’t specify that in the WLPE call, does WLPE stay at the same page, or is it required? I’m asking because on my website, WLPE logs in, loads the page it was already at, THEN loads the page specified in the snippet call. It would be better if it just stayed at the same page the person logged into.
      My Snippets
      -> PopUpChunk v1.0
      • 26435
      • 1,193 Posts
      default is the current page.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 32424
        • 19 Posts
        I noticed this same thing after getting WLPE all set up and working. If I specify a different page to be the home page after logging in, I can see the login page reload briefly before I am sent to the specified home page. Happens on Mac and PC in every browser.

        Unfortunately this bugs my client, and I haven’t found a way around it. Any ideas?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If I recall correctly, someone did fix this, it involved editing the lines in webloginpe.class.php down around 2126 to change the REDIRECT_REFRESH to REDIRECT_META or REDIRECT_HEADER, I forget exactly which it was now, but either one of them should work.
            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
            • 32424
            • 19 Posts
            Success!

            I changed all the instances of REDIRECT_REFRESH to REDIRECT_HEADER between lines 2126 and 2141 of webloginpe.class.php and it seems to have fixed the problem smiley

            Thanks for the tip!
              • 8894
              • 114 Posts
              I think you should change all the instances of REDIRECT_REFRESH to REDIRECT_HEADER in both webloginpe.class.php and snippet code.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                This really needs a serious update incorporating quite a number of bug fixes that can be found by going through the forum posts.
                  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
                  • 28825
                  • 61 Posts
                  Quote from: sottwell at Feb 01, 2008, 10:12 AM

                  This really needs a serious update incorporating quite a number of bug fixes that can be found by going through the forum posts.

                  That’s a great idea Susan and I think Shawn W. did a temporary update patch incorporating all the bug fixes we had listed throughout the forum, but he removed it due to some quirky behavior I think. I tried replacing all the REDIRECT_REFRESH’s with REDIRECT_HEADER’s and: the problem is still there (it refreshes the page and show the default RegSuccessTpl and THEN it goes to RegSuccessID! I don’t know why its not immediately redirecting to the right page. Anyway....

                  *UPDATE/Partial Fix*: I gave up trying to fix the REDIRECT issue, so I just decided to change what the user sees in the interrim. (The solution might be worthwhile even if you’ve managed to fix the problem):

                  The snippet calls for
                   $displayRegSuccessTpl = isset($registerSuccessTpl) ? $wlpe->Template($registerSuccessTpl) : $wlpeDefaultFormTpl;

                  So I created a chunk called: "registerSuccessTpl" which simply said : "CREATING ACCOUNT" and it had an AJAX loader underneath it to make it seem like the website was "working".
                  In the actual WebLoginPE call, I just added the parameter: "&registerSuccessTpl=`registerSuccessTpl`".
                  [just like styling any other template] . And so, I couldn’t get rid of the interim screen, but if you try to register, at least you get a cool "creating account" screen for a second. This is a stupid and unsustainable fix, but at least it’s not ugly anymore. embarrassed

                  Lo and behold, WShawn come up with the same solution to this problem here: http://modxcms.com/forums/index.php/topic,20330.0.html


                  *UPDATE #2* - "Register" is not working in IE....just keeps kicking me back to the RegisterTpl, doesn’t go to RegSuccessID. I am frustrated, annoyed and I am moving on to do other things. (Apparently has nothing to do with REDIRECT_REFRESH, either)


                  Scotty, I’ll PAY YA man, just get over here and fix this thing when you get some time!! Thanks for your hard work!
                    "Don't waste your time or time will waste you"