You are here: Foswiki>Tasks Web>Item1957 (22 Aug 2009, MichaHayler)Edit Attach

Item1957: Problem with redirectto-parameter of edit script

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component: edit
Branches:
Reported By: MichaHayler
Waiting For:
Last Change By: MichaHayler
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

ItemTemplate edit

Summary Problem with redirectto-parameter of edit script
ReportedBy MichaHayler
Codebase 1.0.6
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component edit
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r5 - 22 Aug 2009, MichaHayler
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy