Item8390: Specified anchor is ignored
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: FormPlugin
Branches:
I'm trying to specify an anchor:
%STARTFORM{
name="subtasks"
action="view"
anchor="Subtasks"
noredirect="on"
method="POST"
}%
However, the action URL is being generated as
action="http://example.com/wiki/Web/Topic#FormPluginNotification"
The correct URL is being created, because it's being encoded in the hidden
FP_actionurl
parameter:
<input type="hidden" name="FP_actionurl" value="http://example.com/wiki/Web/Topic#Subtasks"/>
I think the problem is at line 438 of
FormPlugin.pm
. It looks like the logic is flipped. Line 427 undefines
$actionUrl
if
$disableValidation
is true but line 438
uses it if
$disableValidation
is true.
426 # do not use actionUrl if we do not validate
427 undef $actionUrl if $disableValidation;
...
438 $startFormParameters{'-action'} =
439 $disableValidation ? $actionUrl : $currentUrl;
440
Line 438 also doesn't follow the other checks for using
$actionUrl
, which check its value. I'm guessing that it should be rewritten as
$startFormParameters{'-action'} = $actionUrl ? $actionUrl : $currentUrl;
--
DiabJerius - 16 Jan 2010
Fixed in release 1.6.
--
ArthurClemens - 26 May 2010