Item9362: reversed logic for $disableValidation and action URL
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: FormPlugin
Branches:
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