dnp76 dnp76 - 1 month ago 9
PHP Question

Typo3 crashed after installing extension: Parse error: syntax error

I'm running Typo3 7.6 and foolishly tried an out of date extension on my site. I got one error, tried to uninstall the extension and that just made things worse. Now the whole system is crashed from back and front with this error:


Parse error: syntax error, unexpected '=' in
/html/typo3/typo3_src-7.6.10/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
on line 1654


Not sure what it wants me to do with this information.

Here's my code in ExtensionManagementUtility.php on line 1654:

/**
* Execute ext_localconf.php files from extensions
*
* @return void
*/
protected static function loadSingleExtLocalconfFiles()
{
// This is the main array meant to be manipulated in the ext_localconf.php files
// In general it is recommended to not rely on it to be globally defined in that
// scope but to use $GLOBALS['TYPO3_CONF_VARS'] instead.
// Nevertheless we define it here as global for backwards compatibility.
global $TYPO3_CONF_VARS;
foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $_EXTKEY => $extensionInformation) {
if ((is_array($extensionInformation) || $extensionInformation instanceof \ArrayAccess) && isset($extensionInformation['ext_localconf.php'])) {
// $_EXTKEY and $_EXTCONF are available in ext_localconf.php
// and are explicitly set in cached file as well
$_EXTCONF = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]) ? $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] : null;
require $extensionInformation['ext_localconf.php'];
}
}
}


How do I get out of this mess?

Answer

if you just want to recover your installation you need to deactivate that new extension.

you can try to do it in the install tool (just call your-domain.tld/typo3/install/): in the area "Important Actions" you can find the option Check for broken extensions

or you do it by hand: edit typo3conf/PackageStates.php, search that extension and change the state from active to inactive. then clear all caches!

afterwards you can remove the extension.

Comments