Project

General

Profile

Actions

Bug #17122

closed

flexform <eval>required</eval> on type "input" applies only on last input-field

Added by Timo Piatkowski over 17 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2007-03-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

can anyone confirm this?

Could be a problem in the array-creation of $this->requiredFields in class.t3lib_tceforms.php in the function getSingleField_typeInput where keys will be overwritten . . .

e.g.
data[tt_content]3[pi_flexform][data][sDEF][lDEF][ZXlogin][vDEF]
will be overwritten by:
data[tt_content]3[pi_flexform][data][sDEF][lDEF][ZXpasword][vDEF]

the result ist that only the field "ZXpassword" will be evaluated as required

(issue imported from #M5226)


Files

ext_emconf.php (1.18 KB) ext_emconf.php Christian Weiske, 2013-02-01 11:52
ext_tables.php (405 Bytes) ext_tables.php Christian Weiske, 2013-02-01 11:52
flexform_pi1.xml (841 Bytes) flexform_pi1.xml Christian Weiske, 2013-02-01 11:52

Related issues 1 (0 open1 closed)

Blocks TYPO3 Core - Bug #18429: required fields in Flexform are not correct marked with Exclamation SignClosed2008-03-12

Actions
Actions #1

Updated by Luc Muller almost 17 years ago

I got the same problem.

More, with a localization of a flexcontent.

Only de LAST localisation of the LAST input is really required.

otherfields can be bypassed from the moment the LAST localization of the last input is filled correctly.

Updated by Christian Weiske almost 12 years ago

I can confirm this with TYPO3 6.0 (master, last commit e5d2ba5e).

Put the three attached files into typo3conf/ext/flexformtest/, enable the extension, add the plugin to a page and try to save.

TYPO3 will show an error message when both or only the second field is empty. It will not show an error message if the second input is filled out, but the first is empty - although both are required.

Actions #3

Updated by Christian Weiske almost 12 years ago

In typo3/sysext/backend/Classes/Form/FormEngine.php, method getSingleField_typeInput is called. It calls

registerRequiredProperty($type, $name, $value)

with

("field", "tt_content_254_pi_flexform", "data[tt_content][254][pi_flexform][data][sDEF][lDEF][field_input1][vDEF]")

This method registers the required field under its name:

$this->requiredFields[$name] = $value;

Now for both fields, the name is the same (tt_content_254_pi_flexform), causing the requirement for the first field to be overwritten by the second one.

Actions #4

Updated by Gerrit Code Review almost 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918

Actions #5

Updated by Gerrit Code Review almost 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17918

Actions #7

Updated by most wanted almost 11 years ago

We just tested it with the current master and can confirm that this applies also for TYPO3 6.2.

Actions #8

Updated by Armin Vieweg over 9 years ago

What about this issue? Idle for one year, now.

Actions #9

Updated by Markus Klein over 9 years ago

  • Description updated (diff)
  • Category set to Backend User Interface
  • Status changed from Under Review to Accepted
  • Priority changed from Should have to Must have
  • Is Regression set to No

Since the patch was abandoned, I reset the ticket status

Actions #10

Updated by André Müller over 9 years ago

I can confirm this error. It doesn't depend on the input fields. I created elements with DCE and flux and they have the same error. Four required input fields and only the last returns an error. There is a gist https://gist.github.com/muex/e72b44c3c6bfd485e2cf with two fields and they don't have the same name, as anyone mentioned before.

Actions #11

Updated by Christian Kuhn over 9 years ago

this will probably not be fixed in 6.2 anymore. there was a lot of effort in 7 to improve the required handling and it is not possible to backport this stuff to 6.2.

verified: this is fixed in 7, but will not be changed in 6.2. i'll close the issue as 'won't fix' for 6.2 now.

Actions #12

Updated by Christian Kuhn over 9 years ago

  • Status changed from Accepted to Closed
Actions

Also available in: Atom PDF