Fatal error in indexed search pibased plugin
Fatal error: Call to a member function includeLLFile() on a non-object in indexed search pibased plugin after pull
It;s a regression caused by https://review.typo3.org/#/c/41592
because $GLOBALS['LANG'] doesn't exist in the frontend context (if be user is not logged in).
[BUGFIX] Fix loading of language file in indexed_search
As $GLOBALS['LANG'] doesn't exist in the frontend context,
language (xlf) file has to be loaded through pi_loadLL.
Reviewed-by: Alexander Opitz <firstname.lastname@example.org>
Tested-by: Alexander Opitz <email@example.com>
Reviewed-by: Wouter Wolters <firstname.lastname@example.org>
Tested-by: Wouter Wolters <email@example.com>
#3 Updated by Vladimir Falcon about 4 years ago
I'm not sure but I think this Patch do not work, at least it did not work for me.
Function main ()
The function pi_loadLL does not takes any parameter.
The fatal error is gone but translation as well.
Replace line 185 whit the following lines
/** @var $languageFactory \TYPO3\CMS\Core\Localization\LocalizationFactory */
$languageFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LocalizationFactory::class);
$this->LOCAL_LANG = $languageFactory->getParsedData('EXT:indexed_search/Resources/Private/Language/locallang_pi.xlf',$this->LLkey);
Thanks you all
#4 Updated by Tymoteusz Motylewski about 4 years ago
It looks like you're using new indexed search version on the old core.
Or have an xclass or AbstractPlugin, and haven't updated the loadLL method.
Since few weeks the pi_loadLL function takes an argument, see http://review.typo3.org/42934
It was implemented to solve problems like one with indexed search.
I'm not sure though if it was already released in 7.4 or not.