If a module causes an error, you are currently effectively locked out of the shop, as the admin program does not start any more…
In order to regain control, I have modified the class generation process, so that inclusion of the modules is no longer carried out…
The idea is, to start the admin program in that case with a [B]parameter[/B], like
[B]…/admin/index.php?safemode=true[/B]
In order to achieve this, you have to exchange the complete function
“[B]public function getClassName( $sClassName )[/B]” in “[B]core/oxutilsobject.php[/B]”
with the following code.
public function getClassName( $sClassName )
{
//Avenger
$blSafeMode=$this->blSafeMode;
if (!isset($blSafeMode))
{
$blSafeMode=$_COOKIE['safemode'];
if (!isset($blSafeMode))
{
$blSafeMode=oxConfig::getParameter('safemode');
setcookie("safemode",$blSafeMode);
$this->blSafeMode=$blSafeMode;
}
}
if (!$blSafeMode)
{
$aModules = $this->getConfig()->getConfigParam( 'aModules' );
if ( is_array( $aModules ) && array_key_exists( $sClassName, $aModules ) ) {
//multiple inheritance implementation
//in case we have multiple modules:
//like oxoutput => sub/suboutput1&sub/suboutput2&sub/suboutput3
$aClassChain = explode( "&", $aModules[$sClassName] );
$sParent = $sClassName;
//security: just preventing string termination
$sParent = str_replace(chr(0), '', $sParent);
//building middle classes if needed
$sClassName = $this->_makeSafeModuleClassParents( $aClassChain, $sParent );
}
}
//Avenger
// check if there is a path, if yes, remove it
$sClassName = basename( $sClassName );
return $sClassName;
}
It is also a good idea to backup the database.table “[B]oxconfig[/B]” before you make any changes in the modules to include…
So you can recover from a potential problem also…