Item11441: Trunk CommentPlugin redirectto parameter doesn't redirect

pencil
Priority: Normal
Current State: Closed
Released In: 1.2.0
Target Release: n/a
Applies To: Extension
Component: CommentPlugin
Branches: trunk
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
CommentPlugin redirectto combined with target works on Release1.1, fails with trunk version.

%<nop>COMMENT{target="Sandbox/SomeTopic" type="returntab"}%

%TMPL:DEF{returnpromptboxtab}%
<input type="hidden" name="redirectto" value="%BASEWEB%.%BASETOPIC%?tab=discuss" />
%TMPL:P{promptbox}%
%TMPL:END%
%TMPL:DEF{PROMPT:returntab}%%TMPL:P{returnpromptboxtab}%%TMPL:END%
%TMPL:DEF{OUTPUT:returntab}%%POS:BEFORE%%TMPL:P{OUTPUT:threadmode}%%TMPL:END%

On Release 1.1, flow captured is:

  • POST bin/save/Sandbox/SomeTopic parameter dedirectto=TheWeb/TheTopic?tab=discuss
  • GET TheWeb/TheTopic?tab=discuss

On Trunk, flow captured is:

  • POST bin/rest/CommentPlugin/comment param redirectto=TheWeb/TheTopic?tab=discuss param topic=Sandbox/SomeTopic
  • GET Sandbox/SomeTopic

-- GeorgeClark - 14 Jan 2012

Looking at the new CommentPlugin code, redirectto is not implemented.

-- GeorgeClark - 14 Jan 2012

Solution - Comment.pm needs to set the $endPoint parm passed to rest to the redirectto location.

-- GeorgeClark - 14 Jan 2012

Fixed - but not sure if anchor needs to be sanitized or encoded.

-- GeorgeClark - 14 Jan 2012

Needed more work. The rest script doesn't understand redirectto - it wants endPoint. Added more unit tests, and changed the rest save handler to replace endPoint with redirectto parameter if it's provided.

-- GeorgeClark - 15 Jan 2012
 
Topic revision: r7 - 14 Oct 2012, GeorgeClark
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