The INSTALL file in 1.0 now documents the need to set $
FullUrl when running on a non-standard port. (I did not want to change the current behavior without a lot of testing.) --
CliffordAdams
I believe that I have found a bug in the usemod code.
I am running a usemod wiki at http://streetend.force9.co.uk:6969 a port with which usemodwiki seems to have a problem. I also run the same wiki webserver on http://streetend.force9.co.uk with no problem.
The bug concerns the page loaded after a page edit has been saved. This seems to affect the wiki when running on all non-standard ports.
After editing a page and clicking "save" the button, the refreshed page doesn't have the port number within the URL, and so the connection is refused. One of my users has sent me this log from his web proxy:
- TCP_IMS_HIT/304 284 GET http://streetend.force9.co.uk:6969/ - NONE/- text/html
- TCP_MISS/200 2456 GET http://streetend.force9.co.uk:6969/cgi-bin/wiki.pl - DIRECT/212.159.77.227 text/html
- TCP_IMS_HIT/304 265 GET http://streetend.force9.co.uk:6969/hantspenguin.jpg - NONE/- image/jpeg
- TCP_MISS/200 2073 GET http://streetend.force9.co.uk:6969/cgi-bin/wiki.pl? - DIRECT/212.159.77.227 text/html
- TCP_IMS_HIT/304 265 GET http://streetend.force9.co.uk:6969/hantspenguin.jpg - NONE/- image/jpeg
- TCP_MISS/200 1772 GET http://streetend.force9.co.uk:6969/cgi-bin/wiki.pl? - DIRECT/212.159.77.227 text/html
- TCP_IMS_HIT/304 265 GET http://streetend.force9.co.uk:6969/hantspenguin.jpg - NONE/- image/jpeg
- TCP_MISS/200 2013 GET http://streetend.force9.co.uk:6969/cgi-bin/wiki.pl? - DIRECT/212.159.77.227 text/html
- TCP_IMS_HIT/304 265 GET http://streetend.force9.co.uk:6969/hantspenguin.jpg - NONE/- image/jpeg
- TCP_MISS/302 390 POST http://streetend.force9.co.uk:6969/cgi-bin/wiki.pl - DIRECT/212.159.77.227 -
- TCP_MISS/503 1117 GET http://streetend.force9.co.uk/cgi-bin/wiki.pl? - NONE/- -
Note the lack of port number in the last entry.
I'm afraid that my perl skills aren't up to enough to locate and fix this bug, so I'll have to leave it to you.
Any help greatly appreciated.
Tony Whitmore
I had a similar problem. I recognize this isn't an elegant solution, but I was able to resolve the problem by changing line 1122 (UseModWiki version 0.92 (April 21, 2001)) from:
$FullUrl = $q->url(-full=>1) if ($FullUrl eq "");
to:
$FullUrl = $q->url(-relative=>1) if ($FullUrl eq "");
As designed, $FullUrl should be something like http://www.me.com:8080/cgi-bin/wiki/wiki.cgi, which is used as the reference for the refresh. As noted, the port seems to be dropped in this case.
Using -relative sets $FullUrl to the simpler wiki.cgi, forcing the browser to regenerate the full URL. Seems to work for me, though can't say how universal the fix is. Unsure whether the fault lies in our assumptions of CGI.pm's url() function, or in CGI.pm itself. Presumably, one could also use -absolute with much the same effect.
Aaron Marsh (mailto:marsh@bluefinrobotics.com)
- I considered this as a fix, but I am also not sure how universal it is. (One thing to consider is that CGI.pm has changed significantly over the past few years, and I want to support almost any Perl 5 installation.) --CliffordAdams
I have had the problem but have no remedy as yet. The page does not refresh but the text does have the correct link in. Seems it might be a combination of perl and code but funny things do seem to happen on unusual port numbers.
- One thing to try in this case is changing the $RedirType setting from 1 to 2. If that doesn't work, setting $RedirType to 3 will at least give you a page with a link to the right destination. --CliffordAdams