TYPO3-Caretaker / caretaker

TYPO3 extension caretaker
https://extensions.typo3.org/extension/caretaker/
26 stars 23 forks source link

Call to undefined method ContentObjectRenderer::TEXT() #101

Open jvanderkroon opened 5 years ago

jvanderkroon commented 5 years ago

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

TehTux commented 5 years ago

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.

OlafDoering commented 5 years ago

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.

jvanderkroon commented 5 years ago

THNX @OlafDoering frontend works after changing line 76.