Problem:
I have a survey with translation. In the plugin on the translated page I selected the translated survey.
How to reproduce:
Create a survey with a translation.
Create a page with translation and in the translated page, insert the survey plugin "Simple Survey" with option "Show survey questions" and option "Allow user to take part in survey more than once" NOT set.
Now submit a survey in the frontend and call the survey again.
Message "Oops, an error occurred! Code: 201905231354111293fe43" occurs.
Details:
(1/1) #1217839467 TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException
Could not ultimately dispatch the request after 101 iterations. Most probably, a @TYPO3\CMS\Extbase\Annotation\IgnoreValidation annotation is missing on re-displaying a form with validation errors.
in /.../typo3/sysext/extbase/Classes/Mvc/Dispatcher.php line 69
{
$dispatchLoopCount = 0;
while (!$request->isDispatched()) {
if ($dispatchLoopCount++ > 99) {
throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @' . \TYPO3\CMS\Extbase\Annotation\IgnoreValidation::class . ' annotation is missing on re-displaying a form with validation errors.', 1217839467);
}
fails, because the plugin ($this->settings['survey']) has the uid of the translated record and survey object ($survey->getUid()) has the uid of the original language. This triggers an infinite loop between showAction() and finishAction().
Extension version 1.4.1, TYPO3 version 9.5.5
Problem: I have a survey with translation. In the plugin on the translated page I selected the translated survey.
How to reproduce:
Details: (1/1) #1217839467 TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException Could not ultimately dispatch the request after 101 iterations. Most probably, a @TYPO3\CMS\Extbase\Annotation\IgnoreValidation annotation is missing on re-displaying a form with validation errors.
in /.../typo3/sysext/extbase/Classes/Mvc/Dispatcher.php line 69
Cause: The comparison on https://github.com/pixelant/pxa_survey/blob/385191d33baa12ad666492ea8540945cff120ca4/Classes/Controller/SurveyController.php#L125
fails, because the plugin ($this->settings['survey']) has the uid of the translated record and survey object ($survey->getUid()) has the uid of the original language. This triggers an infinite loop between showAction() and finishAction().
Possible solution: See https://github.com/pixelant/pxa_survey/pull/24/files#diff-9fa9187aa49c3aa7e1c646e231ac934e Maybe not the best, but working.