Call to undefined method ContentObjectRenderer::TEXT()
Opened this issue · 3 comments
After installing caretaker 1.0.0 on a fresh TYPO3 v8.7.28 instance i get the following error on a page with the pi_overview plugin
Call to undefined method TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::TEXT()
Error thrown in file
/var/www/html/www/typo3conf/ext/caretaker/Classes/helpers/class.tx_caretaker_LocalizationHelper.php in line 76.
I think this is related to this change https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.0/Breaking-72361-RemovedDeprecatedContentObjectWrappers.html?highlight=text%20contentobjectrenderer
I didn't migrate the plugins because we don't currently use them. You are welcome to create a pull request in the 1.x branch.
In Classes/helpers/class.tx_caretaker_LocalizationHelper.php line 76 needs to be changed from
old: $result = $lcObj->TEXT(array('data' => $locallangString));
new: $result = $lcObj->cObjGetSingle('TEXT',array('data' => $locallangString));
That resolves the problem.
THNX @OlafDoering frontend works after changing line 76.