Item8390: Specified anchor is ignored

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release:
Applies To: Extension
Component: FormPlugin
Branches:
Reported By: Foswiki:Main.DiabJerius
Waiting For:
Last Change By: ArthurClemens
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

 

ItemTemplate edit

Summary Specified anchor is ignored
ReportedBy Foswiki:Main.DiabJerius
Codebase 1.0.8
SVN Range 4715
AppliesTo Extension
Component FormPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
ReleasedIn
Topic revision: r2 - 26 May 2010, ArthurClemens
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