Jump to content

Fatal error upgrading 1.6.0.14 to 1.6.1.0


Recommended Posts

I upgraded my test site from 1.6.0.14 to 1.6.1.0 with 1 click upgrade. Upgrade procedure went smoothly without errors.

But now, both admin and front office page are blank.

 

Fatal error: Call to undefined method Tools::safeDefine() in /home/.........../public_html/test/config/defines_uri.inc.php on line 86

 

I deleted cache files and "class_index.php" reuploded tools.php with ftp, cleaned cookies, browser cache but these did not solve the problem.

 

Can someone please help me?

Edited by eozsoy (see edit history)
Link to comment
Share on other sites

does /public_html/test/classes/Tools.php have a function called safeDefine?  It should look like this

    public static function safeDefine($constant, $value)
    {
        if (!defined($constant))
            define($constant, $value);
    }
Link to comment
Share on other sites

 

does /public_html/test/classes/Tools.php have a function called safeDefine?  It should look like this

    public static function safeDefine($constant, $value)
    {
        if (!defined($constant))
            define($constant, $value);
    }

Yes, tools.php has safeDefine function on line 3537

 

 

/**
* Check if a constant was already defined
* @param string $constant Constant name
* @param mixed $value Default value to set if not defined
*/
public static function safeDefine($constant, $value)
{
if (!defined($constant))
define($constant, $value);
}
Edited by eozsoy (see edit history)
Link to comment
Share on other sites

Problem Solved.

 

The problem was an older version  of tools.php file. Although it was in a different subfolder of classes directory, somehow Prestashop was trying to use the old version.

As soon as I deleted the old file the problem was gone.

  • Like 1
Link to comment
Share on other sites

Problem Solved.

 

The problem was an older version  of tools.php file. Although it was in a different subfolder of classes directory, somehow Prestashop was trying to use the old version.

As soon as I deleted the old file the problem was gone.

but where is this subfolder different that you talk? because i uploaded the tools.php file new and the error is still yet

  • Like 1
Link to comment
Share on other sites

but where is this subfolder different that you talk? because i uploaded the tools.php file new and the error is still yet

i've deleted the file tools.php, into  classes/classes/tools.php and now i get this error in the front office

 

Fatal error: Call to undefined method Currency::getConversationRate() in /home/content/92/11659092/html/clonstore/classes/controller/FrontController.php on line 441

 

and this in the backoffice

 

Fatal error: Undefined class constant 'MODE_STD' in /home/content/92/11659092/html/clonstore/classes/controller/AdminController.php on line 504

Link to comment
Share on other sites

i've deleted the file tools.php, into  classes/classes/tools.php and now i get this error in the front office

 

Fatal error: Call to undefined method Currency::getConversationRate() in /home/content/92/11659092/html/clonstore/classes/controller/FrontController.php on line 441

 

and this in the backoffice

 

Fatal error: Undefined class constant 'MODE_STD' in /home/content/92/11659092/html/clonstore/classes/controller/AdminController.php on line 504

 

 

This subfolder was created by me: when I make modifications to a file I put a copy of the original file into a subfolder. So this tools.php was from prestashop version 1.6.0.14 and it does not have safeDefine function.

 

You mentioned that you deleted "classes/classes/tools.php". As far as I know you shouldn't have another classes folder under Prestashop classes folder. After you deleted tools.php, now currency.php is causing the problem. I guess you should delete the second classes subfolder. But take a backup before deleting.

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...