We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    Hi,
    I’m trying to use WebLoginPE as the login mechanism for a site. So I have it called in a right side bar thusly :

    <div id="sidebarlogin">[!WebLoginPE? &lang=`en`&type=`simple`&liHomeId=`1`&loHomeId=`1`&regHomeId=`56`!] </div>


    And I have a document set up with id=56 which contains as it’s content this :

    [!WebLoginPE? &type=`register` &regSuccessId=`47` &groups=`Registered Users`!]


    Needless to say, there are documents with ids 1 and 47. Friendly URLs are off, fwiw. (And in a belt-and-suspenders move, so is PHx smiley )

    Still, after successfully registering as a new user, I am returned to the page I was called from (id=56) with the default login form that one would expect. After the default 5 seconds though, I should be redirected to document with id 47.

    Instead, I am redirected to a nonexistent URL.

    The website location has the form
    www.example.com/xyz/testsite
    So when various pages are getting called up, I see things like this in the browser
    www.example.com/xyz/testsite/index.php?id=1
    which makes sense.

    What I should be getting sent to upon successful registration - if I understand the docs correctly - is
    www.example.com/xyz/testsite/index.php?id=47
    Instead, the URL as captured by the error tool in Firefox is
    www.example.com/xyz/testsite/xyz/testsite/index.php?id=47
    which of course doesn’t exist and which itself is redirected to the "not found" page for www.example.com

    I have not hacked the WebLoginPE code - can anyone tell me where the error is or where I *should* hack to fix this? Or am I doing something wrong somewhere? Again, I’ve looked through the forums and can’t find any obvious answer.

    Thanks in advance,
    Matt
      • 4310
      • 2,310 Posts
      I’m using version 1.3.2 Beta 1 on a Modx 0.9.6.3 install with FURL’s enabled.
      Just tested the &regSuccessId parameter and it worked correctly.
      The url is generated in the snippet code around line 130
      					if ($registration == 'success')
      					{
      						$url = $modx->makeURL($regSuccessId);
      						$modx->sendRedirect($url,$regSuccessPause,'REDIRECT_REFRESH');
      						//header('Refresh: '.$regSuccessPause.';URL='.$url);
      						return $displayRegSuccessTpl;

      Maybe it’s something to do with your base path as you have xyz/testsite/ being added again.
        • 18913
        • 654 Posts
        Thanks for that heads up. I just pulled down the same code (1.3.2 beta 1) and things seem to be working. The section of code you highlighted is different than what is in 1.3.1
        Matt
          • 4310
          • 2,310 Posts
          There’s been quite a few bugfixes, that must be one of them laugh
            • 7155
            • 160 Posts
            I am having the same re-direction problem. It keeps re-directing to a non-existent page. Is it advisable to use the Beta version for this?
              • 4310
              • 2,310 Posts
              In this case the ’Beta’ version is a collection of bug fixes to reported problems concerning the ’Stable’ version wink
                • 7155
                • 160 Posts
                smiley

                I cant seem to find the link or repository file for this beta version
                  • 4310
                  • 2,310 Posts
                  It may well be the version in the repository marked as 1.3.1.Fixed.
                  But the latest version is on Google Code, see this thread.
                    • 7155
                    • 160 Posts
                    Quote from: bunk58 at Jul 01, 2009, 02:26 AM

                    It may well be the version in the repository marked as 1.3.1.Fixed.
                    But the latest version is on Google Code, see this thread.
                    thanks bunk58!