Skip to content

Commit

Permalink
[BUGFIX] Use correct action names for custom validators
Browse files Browse the repository at this point in the history
For TYPO3 v12 the first actions were renamed to `checkConfirmation` and
`checkCreate`. The test, whether the validators should be called, still
used the old action names `create` and `confirmation`.
  • Loading branch information
mschwemer committed Jun 3, 2024
1 parent d73c726 commit 88c3f87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Domain/Validator/AbstractValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,17 @@ public function setConfiguration(array $configuration): ValidatorInterface
* Validation should be in mostly workflows only on first action. This is createAction. But if confirmation is
* turned on, validation should work in most cases on the confirmationAction.
*
* ToDo: for v13 rename the actions in the condition
*
* @return bool
*/
public function isFirstActionForValidation(): bool
{
$arguments = FrontendUtility::getArguments();
if ($this->isConfirmationActivated()) {
return $arguments['action'] === 'confirmation';
return $arguments['action'] === 'checkConfirmation';
}
return $arguments['action'] === 'create';
return $arguments['action'] === 'checkCreate';
}

/**
Expand Down

0 comments on commit 88c3f87

Please sign in to comment.