Item12062: oopsleaseconflict error in encoding parameters and doesn't accommodate redirectto

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches: trunk
Reported By: LynnwoodBrown
Waiting For:
Last Change By: MichaelDaum
Here was use case where I encountered issue:
  1. An edit link in one topic references a different topic to edit and includes redirectto parameter.
  2. The referenced topic has an existing edit lease in force.
  3. User clicks the "Edit Anyway" link to over-ride the lease.
  4. User clicks "Cancel".
  5. User is sent to url that is correct up to the web reference but then has code such as $percntENCODE{....

Taking a look at oopsleaseconflict.nat.tmpl, I see this code used:
%QUERYPARAMS{format="<input type='hidden' name='$name' value='$percntENCODE{$quot()$value$quot type=$quot()html$quot}$percnt' />"}%

It appeared that the $percntENCODE.. part was not getting rendered. Rather then use the VarENCODE tab on the value, we can use the encoding attribute in VarQUERYPARAMS. I tried replacing the code with the simpler version:
%QUERYPARAMS{format="<input type='hidden' name='$name' value='$value' />" encoding="html"}%
...and it worked fine.

While editing this template, I also noticed the code for the "Cancel" button:
%BUTTON{"%MAKETEXT{"Cancel"}%" target="%WEB%.%TOPIC%" icon="cross"}%

This does not accommodate the existence of a redirectto parameter. I'd tried the following change which worked as desired:
%BUTTON{"%MAKETEXT{"Cancel"}%" target="%IF{"defined redirectto" then="%URLPARAM{"redirectto"}%" else="%WEB%.%TOPIC%"}%" icon="cross"}%

I'll be glad to check in these changes if they make sense.

-- LynnwoodBrown - 29 Aug 2012

 

ItemTemplate edit

Summary oopsleaseconflict error in encoding parameters and doesn't accommodate redirectto
ReportedBy LynnwoodBrown
Codebase
SVN Range
AppliesTo Extension
Component NatSkin
Priority Normal
CurrentState Closed
WaitingFor
Checkins NatSkin:bb1bfdbe18ca
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins NatSkin:bb1bfdbe18ca
Release01x01Checkins
Topic revision: r3 - 24 May 2013, MichaelDaum
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