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.
Vanilla is duplicating the port number
sica07
New
Hello,
I have my vanillaforums installed under the address: http://domain.com:8080/vanilla/.
Now, everywhere in the code, the webroot is registered as "http://domain.com:8080:8080/vanilla/".
This is a big problem because I'm using the Embed Forum option, and when clicking on the discussion links, I get a blank page instead of the discussion. This is happening because every discussion url contains the duplicate port number (e.g. http://domain.com:8080:8080/vanilla/discussion/1/bam-you-ve-got-a-sweet-forum#latest).
How can I solve this issue?
Thank you!
0
Comments
what version of vanilla?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
v. 2.1b2 (sorry for the late reply)
I noticed this issue too
I thought here migth have been fix here
https://github.com/vanilla/vanilla/commit/c8a2bd9d3d70896a45de00bed4fd96ab50b280ab#diff-bd6912ff9a67e6509f4490a88dbb4dc4
But that doesn't sort the issue.
This a possible fix
https://github.com/duellsy/Garden/commit/e7ed5177049c109c4807960fed603c8b64bc7864
grep is your friend.
Sorry i was right the first time (pre edit)
This is fixed in 2.2, and need back porting (no pun intended)
https://github.com/vanilla/vanilla/commit/c8a2bd9d3d70896a45de00bed4fd96ab50b280ab#diff-bd6912ff9a67e6509f4490a88dbb4dc4
grep is your friend.
Great! Thank you!
i have the same issue, is my first vanilla forum i'm testing on my local mamp
just checked
is v 2.1
in
library/core/class.request.php line 280 is
if (!in_array($Port, array(80, 443)))
my url is
http://my.vanilla.it:8888/
and become
http://my.vanilla.it:8888:8888/
Confirmed for v2.1.6 as well. Tried switching over to using ports other than 80 (those above port 1024 etc.) with nginx instead of hostnames and just came across this bug.
This is still an issue on a fresh install of Vanilla. Duplicating port number 8888.
Inside library/core/class.request.php within the function Url there is two lines you can comment out line 835 and 836
//if (!in_array($Port, array(80, 443)))
//$Host .= ':'.$Port;
Facing this issue in 2.1.11 too. The link to home duplicates the port.
The two-line edit @x00 mentioned has worked.