#106369redirectToUri has no effect anymore
Description
Hello,
I recently updated to TYPO3 version 13.4.7.
I have an extension that handles a custom form request, sends an email and should then redirect to a small “Thank You” page.
Everything is working but unfortunately, the code I used before to redirect no longer works since the update.
I’m not receiving any errors—instead, the page simply reloads, but the section where the plugin was included appears empty.
I have added a picture of the returned RedirectResponse.
protected function sendAppointmentRequest($args): ResponseInterface
{
$recipient = $args['email'];
$answer = $this->settings['answeremail'];
$answerName = $this->settings['answername'];
$bccEmail = $this->settings['bccemail'];
$bccName = $this->settings['bccname'];
$subject = $this->settings['subject'];
$templateName = 'Appointment';
$redirectPage = $this->settings['redirectPage'];
$variables = [
'args' => $args,
'answeremail' => $answer,
'answername' => $answerName,
];
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($variables);die;
if (null !== $recipient && !empty($args)) {
$this->sendTemplateEmail($recipient, $answer, $answerName, $bccEmail, $bccName, $subject, $templateName, $variables);
}
$uri = $this->uriBuilder->reset()->setTargetPageUid((int)$redirectPage)->build();
return $this->redirectToUri($uri);
}Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 4
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-03-13T17:02:17+00:00" > 03/13/25, 17:02 </span>Could another middleware be involved? Or some internal additional redirect? How is the extbase action defined (cached/uncached)?
Maybe you can create a minimal extension to try to reproduce this in a vanilla installation without other extensions?
-
Sabrina Zwirner commented and changed assigned to Sabrina Zwirner done
0 %100 % <span data-processor="relativetime" data-value="2025-03-14T06:50:35+00:00" > 03/14/25, 06:50 </span>This can be closed….
I should have drank one coffee more.The function is used in the requestAction…
There inside was a return statement missing. So it was always showing the empty Request.html.
Old code is a blast to work with :Dpublic function requestAction(ContactForm $contactForm): ResponseInterface { $args = $this->request->getArguments(); if ([] !== $args) { $this->sendAppointmentRequest($args['contactForm']); } else { return $this->redirectToPage((int) $this->settings['redirectFailurePage']); } return $this->htmlResponse(); } -
Garvin Hicking commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-03-14T07:26:24+00:00" > 03/14/25, 07:26 </span>Thanks for getting back and you solving the riddle. :) Closing as requested.
Strange, I used ->redirectToUri() today in an Extbase action with v13.4.7 (which worked).