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

ngnix 404 not found

Image and video hosting by TinyPic
my site was using apache,but now i switch to ngnix and it caused a problem,when i clicking on each reaction its bugged and showed a ngnix 404 not found.

Comments

  • edited April 2014

    This problem doesn't have to do with Nginx; this is a bug in the plugin.

    For Peregrine Reactions v2.4, open the /plugins/PeregrineReactions/default.php file.

    The following code within the DiscussionController_AfterReactions_Handler method is line 273 in the file:

    echo '<span class="PeregrineClick React-' . $x . '"  <a href="index.php?p=/discussion/peregrinereactions/' . "$RecordType/$x/$RecordID" . '" title="' . "xx" . $TitleReact[$x] . '" rel="nofollow">' . $Image . " " . $React[$x] . ' </a></span>';
    

    The problem is that the URL outputted by this line of code, index.php?p=/discussion/peregrinereactions/, is a relative URL.

    Here's an example of what the code above is trying to do: say you were viewing a discussion where the link in your web browser's address bar is http://example.com/discussion/123/an-example-post. The web browser will interpret the relative URL outputted by the code above as http://example.com/discussion/123/index.php?p=/discussion/peregrinereactions/comment/1/123, which is wrong, as the index.php file actually exists at the root directory of the website in this example.

    To fix the problem, the line must be modified to output the correct URL. To do so, you can use the Url() function from Vanilla to have Vanilla output the correct path like so:

    echo '<span class="PeregrineClick React-' . $x . '"  <a href="' . Url('/discussion/peregrinereactions/') . "$RecordType/$x/$RecordID" . '" title="' . "xx" . $TitleReact[$x] . '" rel="nofollow">' . $Image . " " . $React[$x] . ' </a></span>';
    

    Add Pages to Vanilla with the Basic Pages app

  • ty,much appreciated.

Sign In or Register to comment.