Jump to content

Error with modules in admin


Recommended Posts

While in admin when i try to click on Modules >>> Modules i get the following error.

 

[PrestaShop] Fatal error in module file :/hermes/bosoraweb163/b34/ipg.lornalovecouk/lornalovecouk/tools/smarty/sysplugins/smarty_internal_templateparser.php:
Allowed memory size of 33554432 bytes exhausted (tried to allocate 4864 bytes)

 

Im running Prestashop 1.6.0.14

 

Any ideas on how i may be able to correct this please.

Link to comment
Share on other sites

Did you add any new module recently? If the site is not live, you can try with a crash test and prefix all modules' folders with an underscore (or 1 by 1), so that prestashop is not able to read them. Just to find out which one breaks the page.

Or, go to config/alias.php, find this method

 

function displayFatalError()
{
	$error = null;
	if (function_exists('error_get_last'))
		$error = error_get_last();
	if ($error !== NULL && in_array($error['type'], array(E_ERROR, E_PARSE, E_COMPILE_ERROR )))
		echo '[PrestaShop] Fatal error in module file :'.$error['file'].':<br />'.$error['message'];
}

And print a backtrace of it

 

		$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5);
		if ($trace && is_array($trace) && sizeof($trace) > 2)
		{
			unset($trace[0]); // this module
			unset($trace[1]); // hook core
			foreach ($trace as $element) {
				$string .= ' <- ' . $element['class'];
			}
			echo $string;
		}
		

Just by adding that at the beginning of the method. It will tell you which module triggered the fatal error

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...