# readLLXMLfile error in typo3 extbase extension

While TYPO3 update to TYPO3 6.2 and Pi-Based Extensions throws error of “t3lib_div::readLLXMLfile” which is deprecated in typo3 6.2.xx version

updating TYPO3 from 4.5 to 6.2 version many Pi-Based Extension adjustments a particularly annoying bug has stayed with us.

For me, this error has only be shown if a new content item in the backend should be created.

The error was in the PI1, PI2, … ” … wizcon.php “file and generated a 500 error.

Following error may show in your backend area

( ! ) Fatal error: Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfile() in C:\wamp\www\typo3\jainish\typo3conf\ext\js_contact_form\pi1\class.tx_jscontactform_pi1_wizicon.php on line 72


t3lib_div :: readLLXMLfile is not supported in latest version of typo3. we have to replace those deprecated function to new function

To correct the problem, you have to replace both line.

// OLD CODE
$llFile = t3lib_extMgm::extPath('YOUR_EXTENSION').'locallang.xml';$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile,$GLOBALS['LANG']->lang);

// New Code
$llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('YOUR_EXTENSION').'locallang.xml';$parser = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml');
$LOCAL_LANG =$parser->getParsedData($llFile,$GLOBALS['LANG']->lang);


I hope this will work for you.

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya