Item12062: oopsleaseconflict error in encoding parameters and doesn't accommodate redirectto
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches: trunk
Here was use case where I encountered issue:
- An edit link in one topic references a different topic to edit and includes
redirectto
parameter.
- The referenced topic has an existing edit lease in force.
- User clicks the "Edit Anyway" link to over-ride the lease.
- User clicks "Cancel".
- 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