Bug: Manage Web function returns error but succeeds
When using the
ManageWeb functionality to create a new web, the following oops was returned:
...?template=oopsmngcreateweb&param1=%TMPL:P{%22msg_create_web_ok%22}%
The message says:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
However, examining the data directory afterwards, the new web appears to have been created and the documents have been copied from the template web.
Test case
Environment
--
ThomasWeigert - 08 Apr 2005
Impact and Available Solutions
Follow up
I've seen this error too.
--
MartinCleaver - 08 Apr 2005
Was this Cairo or
DevelopBranch?
--
CrawfordCurrie - 08 Apr 2005
Cairo for me.
--
MartinCleaver - 08 Apr 2005
As it says above, the release was Cairo...
--
ThomasWeigert - 08 Apr 2005
Tested on Dakar... works fine.
--
ThomasWeigert - 01 May 2005
Fix record
The problem occurs because the string is not encoded properly. Part of the called url is:
param1=%TMPL:P{%22msg_web_name%22}%
As you can see the % chars around TMPL should be encoded to %25.
A way to fix this is to add the %25 manually in Manage.pm:
sub _template {
my $theTmplVar = shift;
return "%25TMPL:P{\"$theTmplVar\"}%25";
}
The routine
_template is only used in
Manage::createWeb, so I don't think this will break things.
(percentage characters cannot be encoded in a general method, like
TWiki::handleUrlEncode, because this will break all variables)
--
ArthurClemens - 15 Jul 2005
Discussion