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.

Embed forum : problem with force remote URL (redirecting all links to homepage, missing slash)

SkybusterSkybuster New
edited November 2012 in Vanilla 2.0 - 2.8

Hello,

I'm encountering a problem I've been unfortunately unable to solve by myself and I'm very embarassed not to found a solution :-( . Maybe Vanilla's community has a solution (fingers crossed !).
Using Vanilla 2.0.18.4.
My forum URL is : http://forum.mydomain.com.
It is embed in http://www.mydomain.com/forum/ , force remote url is set to : http://www.mydomain.com/forum/.
With Force remote URL enabled, from the embed forum, if a user copy-paste the link to a discussion, he will be redirected to the homepage of my embed forum and no to the discussion apparently because of a missing slash after the #.

For instance, with
http://forum.mydomain.com/discussion/23/title-of-my-discussion
would lead the user to :
http://www.mydomain.com/#discussion/23/title-of-my-discussion
instead of :
http://www.mydomain.com/#/discussion/23/title-of-my-discussion

I would be very grateful if somebody has a solution concerning that problem that is currently preventing all my forum's members from direct linking to a discussion.

Thanks by advance !
Skybuster

Comments

  • I have exactly the same problem using the same version of Vanilla. Have you been able to solve the problem or has anybody else an idea how to fix it?

  • SkybusterSkybuster New
    edited November 2012

    Unfortunately, no :(

  • SkybusterSkybuster New
    edited November 2012

    *sorry, bug. You can delete this answer.

  • peregrineperegrine MVP
    edited November 2012

    Wild Guess. put or change this in conf/config.php and see if it helps.

    $Configuration['Garden']['RewriteUrls'] = FALSE;

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

  • First of all thanks for your answer.
    I have just tried your change, I'm sorry but it still doesn't work :(

  • The suggested change had already been set in config.php. Should the mistake not be somewhere in the directory plugins/embedvanilla, maybe in the javascript, which creates the URLs?

  • I have just found a solution that works for me.

    In plugins/embedvanilla/local.js there is a part
    // If not embedded and we should be, redirect to embedded version.
    I added the missing slash in this line:
    document.location = remoteUrl + '#/' + path;
    After that I cleared the cache including the files in cache/smarty/compile but I don't know if this was necessary.

    I hope the same will solve the problem for you as well.

  • Works like a charm ! Thank you very much stefan90, problem fixed !

  • Version 2.0.18.8

    WOW! I haven't noticed the slash missing after #. Correcting it gives me exactly the result I want. But can you give me some additional info because I did your solution and it didn't work (I deleted cache of course..).

    conf/config.php:

    $Configuration['Garden']['RewriteUrls'] = $Configuration['Format']['Hashtags'] =

  • No need to answer, my bad. Your solution works amazingly well! Thank you!!!!!

Sign In or Register to comment.