Task #82493

BUGFIX: Fix wrong error path of validation

Added by Forger Service about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-09-16
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

As the object name, the form, has to be on top level before properties, we should add it.
Otherwise further parts, like error class of form elements, do not work.

Resolves: #82093
This issue was automatically created from https://github.com/TYPO3/TYPO3.CMS/pull/82


Related issues

Duplicates TYPO3 Core - Bug #82093: Form Viewhelpers: Attribute errorClass not working Closed 2017-08-13

History

#1 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54150

#2 Updated by Susanne Moog about 2 years ago

  • Duplicates Bug #82093: Form Viewhelpers: Attribute errorClass not working added

#3 Updated by Susanne Moog about 2 years ago

  • Status changed from Under Review to Closed

Closed as duplicate.

#4 Updated by Joshua Westerheide about 2 years ago

Couldn't write to https://forge.typo3.org/issues/82093 because this issue was closed:

Johannes Hollmann mentioned that this fix opens another bug (https://forge.typo3.org/issues/82093#note-8).

My suggestion is to change the \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper::getMappingResultsForProperty method.
This method accesses the $originalRequestMappingResults. Because it enforces a hierarchy (first level is the form name, second level the field name), the mapping result creates empty results for the requested path (\TYPO3\CMS\Extbase\Error\Result::forProperty).
It should rather access the fields on the root level (without the form name level).
As this happens in a controller context and the properties are already mapped by \TYPO3\CMS\Form\Domain\Runtime\FormRuntime::mapAndValidatePage there might not be any reason to have this hierarchy.

However I don't know how this behaves when there are multiple forms on one page.

Also available in: Atom PDF