I have a working custom form finisher, inside this finisher I make a curl request and based on the result I either redirect the form submitter to a success or failure page. I do this using the built-in redirect finisher and it works fine.
$formDefinition = $this->finisherContext->getFormRuntime()->getFormDefinition();
$formDefinition->createFinisher('Redirect', [
'pageUid' => $uid
]);
$finishers = $formDefinition->getFinishers();
end($finishers)->execute($this->finisherContext);
Then I changed my mind against a redirect and wanted to display a content element depending on the status of the request. So I changed it from 'Redirect' to 'Confirmation', which is also a built-in finisher for the form framework.
$formDefinition = $this->finisherContext->getFormRuntime()->getFormDefinition();
$formDefinition->createFinisher('Confirmation', [
'contentElementUid' => $uid
]);
$finishers = $formDefinition->getFinishers();
end($finishers)->execute($this->finisherContext);
(The content element is a simple 'text' CE with a header and bodytext)
My problem now is that the content element is not rendered in the frontend or rather it is not displayed. I have checked that the uid of the element provided to the finisher is correct and that the element is accessible. I also checked that the finisher is able to get the template and content of the CE and it works just fine. But in the end it simply does not output the content to the frontend. The form itself disappears as it should and only the header remains, but it does not render the content of the CE. (There is also no error or anything like that).
Am I missing something that is required for this particular finisher to work properly? (Im currently working with Typo3 v12.4)