Issue Bug Closed

#93646ContentObjectRenderer gets resetted when using FluidEmail

Paul Kamma 03/04/21, 12:28 updated 09/02/26, 13:51

Description

I noticed this problem in a special situation in my extbase plugin.
I have a classic structure with show,submit,success actions.
@show@ displays a normal form
@submit@ do some checks and when the check is false I forward back to show .

In my show ation I use $this->configurationManager->getContentObject(); to read out some informations out of the content element.
After the I made some checks in the submit action I forward back to show , in this situation the data of $this->configurationManager->getContentObject(); is empty.

The reason for this is I noticed happens because I make a mail submit in the submit action and use FluidEmail
@$mail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\FluidEmail::class);@

When this line is added the getContentObject() returns an empty ContentObjectRenderer .

My workaround for this problem was

$contentObject = $this->configurationManager->getContentObject();
// do something with email like  GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\FluidEmail::class);
$this->configurationManager->setContentObject($contentObject);

Daniel Siepmann noticed that inside the constructor of the StandaloneView the contentObjects gets ‘resetted’
https://github.com/TYPO3/TYPO3.CMS/blob/2f6fb781a2f9387c875cb176c2842426f70d52c8/typo3/sysext/fluid/Classes/View/StandaloneView.php#L45

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-09-02T13:51:46+00:00" > 09/02/26, 13:51 </span>

    Hey,

    the full chain has been changed and therefore closing this issue.