Bug #93646
openContentObjectRenderer gets resetted when using FluidEmail
0%
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 formsubmit
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