Bug #52607
Domain Model validators are executed twice
Status: | Resolved | Start date: | 2013-10-08 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Alexander Schnitzler | % Done: | 100% |
|
Category: | Extbase | Spent time: | - | |
Target version: | next-patchlevel | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: |
Description
Fix for this needs to be backported from Flow
@see #49624
Related issues
Associated revisions
[BUGFIX] Add domain model validators only once
If a domain model validator is present and a controller
action accepts this domain model as argument, the validator
is added twice to the validation tree.
It is added in
ValidatorResolver::buildMethodArgumentsValidatorConjunctions()
and in ValidatorResolver::addCustomValidators() which is called
from ValidatorResolver::getBaseValidatorConjunction()
Both methods are called when building the validation tree in
ActionController::initializeActionMethodValidators()
Resolves: #52607
Releases: master, 6.2
Change-Id: Ic1674bacfb027840d9b8fcd1d66586ebb0e75ad6
Reviewed-on: http://review.typo3.org/36915
Reviewed-by: Patrick Schriner <patrick.schriner@diemedialen.de>
Tested-by: Patrick Schriner <patrick.schriner@diemedialen.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Andy Grunwald <andygrunwald@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
[BUGFIX] Add domain model validators only once
If a domain model validator is present and a controller
action accepts this domain model as argument, the validator
is added twice to the validation tree.
It is added in
ValidatorResolver::buildMethodArgumentsValidatorConjunctions()
and in ValidatorResolver::addCustomValidators() which is called
from ValidatorResolver::getBaseValidatorConjunction()
Both methods are called when building the validation tree in
ActionController::initializeActionMethodValidators()
Resolves: #52607
Releases: master, 6.2
Change-Id: Ic1674bacfb027840d9b8fcd1d66586ebb0e75ad6
Reviewed-on: http://review.typo3.org/37579
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
History
#1 Updated by Andreas Allacher over 1 year ago
Should be included before final v6.2 LTS
Currently the validators are called double. The issue was introduced most likely with this change:
https://git.typo3.org/Packages/TYPO3.CMS.git/commit/66fb0ad5c6755089db014cd329357898632bf444
because now the validator is found via buildMethodArgumentsValidatorConjunctions and buildBaseValidatorConjunction and added on both parts.
#2 Updated by Online Now! GmbH 12 months ago
Bug is still present in TYPO3 6.2.4. Also if you add an annotation @validate with the validator before a controller action, the validator gets executed three times. Only workaround in the mean time is to put the validators not in the \Domain\Validator directory or modify the Extbase source code.
#3 Updated by Alexander Opitz 10 months ago
- Project changed from Extbase MVC Framework to Core
- Category changed from Extbase: Validation to Extbase
- Target version changed from Extbase 6.2 to next-patchlevel
- TYPO3 Version set to 6.2
- Is Regression set to No
#4 Updated by Alexander Schnitzler 6 months ago
- Status changed from New to Accepted
- Assigned To set to Alexander Schnitzler
#5 Updated by Gerrit Code Review 6 months ago
- Status changed from Accepted 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 http://review.typo3.org/36915
#6 Updated by Anonymous 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e5c3c6cb070f8d059fff3dbc949142531e0a36ce.
#7 Updated by Gerrit Code Review 5 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37579
#8 Updated by Anonymous 5 months ago
- Status changed from Under Review to Resolved
Applied in changeset ae317f2ae12c7e3743b5b5810c89c7223c9a902c.