Item9362: reversed logic for $disableValidation and action URL

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: FormPlugin
Branches:
Reported By: DiabJerius
Waiting For:
Last Change By: GeorgeClark
Here's a simple form, which should create a topic:

%STARTFORM{
    name="CreatePage"
    action="save"
    topic="TestAUTOINC000000"
    method="post"
}% %FORMELEMENT{
   name="submit"
   type="submit"
   format="$e"
   buttonlabel="Create"
}%
%ENDFORM%

Unfortunately, it doesn't. It just redisplays the parent topic. The problem seems to be in FormPlugin.pm:

    536     $startFormParameters{'-action'} =
    537       $disableValidation ? $actionUrl : $currentUrl;
    538 

This uses $actionUrl if validation is disabled.

There's a comment above this:

    523     # do not use actionUrl if we do not validate

which (rewritten) says that $actionUrl should be used if we do validate. That's the opposite of the logic at line 537. If I invert the logic there, my form works.

-- DiabJerius - 20 Jul 2010

I forgot to mention that this is in version 1.6.2 ( 7602 (2010-05-31) )

-- DiabJerius - 20 Jul 2010

Checked in FormPlugin 2.0 and works as expected.

-- ArthurClemens - 30 Apr 2011
 

ItemTemplate edit

Summary reversed logic for $disableValidation and action URL
ReportedBy DiabJerius
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component FormPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 01 May 2011, 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