Issue Bug Closed

#106369redirectToUri has no effect anymore

Sabrina Zwirner 03/13/25, 14:12 updated 03/14/25, 07:26

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.