HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Successful New User Sign-In from Discussion, or Article, Results in "Page Not Found"

edited August 2015 in General Banter

I'm hoping some one here will recognize what is happening to new users attempting to comment through the "Sign In or Register to comment" link at the foot of discussions and articles in our forum. After signing-in, the user ends up at a page not found inside the forum.

The URL of the page not found is repeating the directory name of the forum, eg:

the home page of the forum is:
domain.com/vanillaforum/index.php

and the URL of the article or discussion is:
domain.com/vanillaforum/discussion_or_article

But that is eventually redirected to:
domain.com/vanillaforum/vanillaforum/discussion_or_article

There have been some modifications to original .htaccess, but we have tested the forum with the unmodified, original .htaccess and are getting the same problem. We have also tried he rewrite line with the name of the folder ("/vanillaforum") and without the name of the subfolder ("/").

Thanks in advance for any help, or direction, anyone might be able to provide.

Tagged:

Comments

  • edited August 2015

    IMPORTANT UPDATE: It is the "Sign-In or register to comment" link which results in the addition of this folder name. This occurs with articles and with discussions.

    On the other hand, if one signs in or registers from a page using the usual Sign-in & Register routine in upper left of page, then the redirect works just fine and one is returned to the page one started with.

  • peregrineperegrine MVP
    edited August 2015

    The duplication of the "forum folder" in a link occurs in more than the place you mentioned. and I believe it is fixed in the next release. so you are going to need to live with that knowledge, and wait patiently for the next release or search on github for the fix. it is the way the parsing technique mishandled relative paths with urls.

    here's a fix.

    replace these four lines to fix signin

    https://github.com/vanilla/vanilla/blob/master/applications/vanilla/views/discussion/helper_functions.php#L403

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks Peregrine for all the insights and help. I've got to improve my github searching skills.

  • edited August 2015

    Awesome. The suggested fix works great.

    I used lines 403 through 408 of file Peregrine linked above. I put them into my Vanilla 2.1.11 file (application/vanilla/views/discussion/helper-functions.php). Peregrine's suggested lines replace lines 408 through 412 in the original file.

    More good news is that I had earlier found my way to the lines in question by searching for "SignInorRegister" by retracing the functions. My big problem, that Peregrine's suggestion fixed, was knowing what to do once I got to that place. I trust that when I stumble on this again, I'll have much better chance of knowing what to do. Right now I am going to test the same links on articles in the Articles app. Thanks, again.

  • Thanks for the fix - about to post about this exact issue. =)

Sign In or Register to comment.