Item1957: Problem with redirectto-parameter of edit script
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component: edit
Branches:
Using the redirectto-parameter of edit with %SCRIPTURLPATH{"edit"}%... as parameter redirects to a not working url:
%SCRIPTURLPATH{"edit"}%
expands to
/foswiki/bin/edit
in my configuration (so far so good).
so the edit-script ULR looks like
http://myFQHostename/foswiki/bin/edit/Sandbox/?topic=NeuesTopic&redirectto=/foswiki/bin/edit
saving this topic redirects to
http://myFQHostename/foswiki/foswiki/bin/edit
which of course doesn´t work (
/foswiki/foswiki
)
I tried to figure out, if it´s a configuration problem, but this all seems okay to me
(
/foswiki/bin
as script-alias;
/foswiki/pub
als pub-alias)
--
MichaHayler - 21 Aug 2009
What did you use as redirectto url?
--
ArthurClemens - 21 Aug 2009
%SCRIPTURLPATH{"edit"}%/Sandbox/?topic=NeuesTopic&redirectto=%SCRIPTURLPATH{"edit"}%
gives me
http://myFQHostename/foswiki/bin/edit/Sandbox/?topic=NeuesTopic&redirectto=/foswiki/bin/edit
saving or cancelling this gives me
http://myFQHostename/foswiki/foswiki/bin/edit
which should be
http://myFQHostename/foswiki/bin/edit
so the redirectto url ist
&redirectto=/foswiki/bin/edit
which gets redirect to
http://myFQHostename/foswiki/foswiki/bin/edit
--
MichaHayler - 21 Aug 2009
See System/CommandAndCGIScripts:
redirectto
accepts either:
- Topic
- Web.Topic
- a full url
%SCRIPTURLPATH{"edit"}%
does not result in a full url.
This should work:
%SCRIPTURL{"edit"}%/Sandbox/?topic=NeuesTopic&redirectto=%SCRIPTURL{"edit"}%/Sandbox/NeuesTopic
--
ArthurClemens - 21 Aug 2009
Great, this works.
So the error was to use
%SCRIPTURLPATH{"edit"}%
with =redirectto=
%SCRIPTURL{"edit"}% gives a full url and works with =redirectto=
Thanks for your help
--
MichaHayler - 22 Aug 2009