Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] Remote URL goes to 404 on password reset

therobtherob New
edited March 2011 in Vanilla 2.0 - 2.8
Hi, this has been edited because the first description I put was a load of rubbish...

I am a reasonably new Vanilla user embedding into WP with the following versions:

I have an issue with the password reset email in that it sends the user to the base url

/forum/index.php?p=/entry/passwordreset/2/1FZAD2

but I wanted the user to be redirected to the embedded forum, instead it redirects to a 404 and the user cant change their password address is as follows:

/?page_id=5#/index.php?p=/entry/passwordreset/2/1FZAD2

if I change it to this

/?page_id=5#/entry/passwordreset/2/1FZAD2

then it works...

Any way I can make this work?

Sorry if this has been answered anywhere else- I cant find any info on it.

Thanks in advance

Comments

  • Sorry to do this but - Bump - any help with this would be great

    that "index.php?p=" is causing quite a few 404 errors through my site - anyone got any ideas what the cause could be? - obviously got something to do with the remote url redirect, everytime it does it it adds the "index.php?p=" to the redirected address and it thats when it pulls up the 404 error.

    can anyone shed some light on this?
  • ToddTodd Chief Product Officer Vanilla Staff
    Okay, first try and get your site working with rewrite urls.

    1. See if a rewritten url will work. Browse to a page and remove the index.php?p= from the url and see if the proper page displays.
    2. If this works then add the following to your config.php:
    $Configuration['Garden']['RewriteUrls'] = TRUE;
    Next, add the following to your config.php:
    $Configuration['Garden']['ExternalUrlFormat'] = 'http://yourforum.com/?page_id=5#';
  • Thanks for the super quick response Todd, I have just tried the above step1 and it worked so step 2 has been implemented, I will check over time to see if this has worked.

    The main issue that I am looking at is the password reset email, the reset link that you get sent through on the email includes the index.php?p=, if I go to the link without it then it works - have you got any idea where I could change that?

    Thanks again for the quick response - have been really impressed with the vanilla community.
  • ToddTodd Chief Product Officer Vanilla Staff
    The ExternalUrlFormat should actually fix that because it overrides the index.php part.

    That index.php is in there when you don't have url rewriting turned on. When the application installs it tries to detect whether or not url rewriting will work, but sometimes it can't detect things properly even though your server allows it.
  • Not sure if I am doing something wrong but the emails coming through when I test are still getting the a link thrown which has the base url:

    http://www.myforum.com/forumbasefolder/index.php?p=/entry/passwordreset/2/TRJ***

    as apposed to:

    http://www.myforum.com/?page_id=5#/entry/passwordreset/2/TRJ*** which when tested works like a charm.

    any ideas? - even if I hard code the first part of the url into the email?
  • I have no idea what I did wrong yesterday, but today the config.php file didn't show the edits from yesterday... so with the edits to the config.php actually done the link on the password reset email now is the embed url, a good start!... but not quite there because there is no /entry/passwordreset/2/CODE01 after the embed url... so the user will still be unable to reset their password

    Any help appreciated - @Todd I totally understand that you guys have a huge amount of stuff to do, thanks for the help so far...


  • ToddTodd Chief Product Officer Vanilla Staff
    edited March 2011
    Ah, whoops. You need to add a %s to the end of the ExternalUrlFormat. So do this:
    $Configuration['Garden']['ExternalUrlFormat'] = 'http://yourforum.com/?page_id=5#%s';
  • HA!! Brilliant!!- all sorted now...

    Thanks you so much @Todd
    Marked as Solved
  • Actually - just ran the test and there should be a '/' between the password and '%s' - should read:
    $Configuration['Garden']['ExternalUrlFormat'] = 'http://www.yourforum.com/?page_id=5#/%s';

    is that right? - seems to be working fine now...

    Thanks again
Sign In or Register to comment.