Task #82493
closedBUGFIX: Fix wrong error path of validation
0%
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
Updated by Gerrit Code Review almost 7 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
Updated by Susanne Moog almost 7 years ago
- Is duplicate of Bug #82093: Form Viewhelpers: Attribute errorClass not working added
Updated by Susanne Moog almost 7 years ago
- Status changed from Under Review to Closed
Closed as duplicate.
Updated by J W almost 7 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.