Project

General

Profile

Actions

Task #82493

closed

BUGFIX: Fix wrong error path of validation

Added by Forger Service over 6 years ago. Updated over 6 years ago.

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

0%

Estimated time:
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 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #82093: Form Viewhelpers: Attribute errorClass not workingClosedRalf Zimmermann2017-08-13

Actions
Actions #1

Updated by Gerrit Code Review over 6 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

Actions #2

Updated by Susanne Moog over 6 years ago

  • Is duplicate of Bug #82093: Form Viewhelpers: Attribute errorClass not working added
Actions #3

Updated by Susanne Moog over 6 years ago

  • Status changed from Under Review to Closed

Closed as duplicate.

Actions #4

Updated by J W over 6 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.

Actions

Also available in: Atom PDF