Jump to content
thirty bees forum
  • 0

Fatal error: Call to undefined method Logger::addLog() in /home/shopboot/domains/boottrailers.nl/public_html/boot/classes/controller/AdminController.php on line 1336


cdwebman

Question

I get an error message :

Fatal error: Call to undefined method Logger::addLog() in /home/shopboot/domains/boottrailers.nl/public_html/boot/classes/controller/AdminController.php on line 1336

When changing an employee / customer etc.

When i disable all non thirty bees modules by hand in modules ( i have only 3 non-thirty bees modules in use ) the error is still there.

When i disable non-thirty bees module in section "Performance" the error is gone. ! ????

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 1

@cdwebman one of your modules declares class with name Logger. This causes collision with built-in PrestaShopLogger. Even if you disable the module, this class gets loaded to to classpath, and causes the issue.

Basically there are two things wrong in tb core:

1) including files from disabled modules 2) core using Logger alias instead of PrestaShopLogger class

  • Thanks 1
Link to comment
Share on other sites

  • 0

I disabled ALL Modules, also the Thirty Bees modules, but i keep the error message :(

Again try : at "Performance" disable all non TB modules" put it to YES" and no errors : "update succesfully"

ps. It would be nice at the Modules section to select them all, and than have the choice "disable" and "enable"

Link to comment
Share on other sites

  • 0

It's a new install with a migration with this module : MigrationPro: PrestaShop To PrestaShop Migration Tool v5.4.4 - by MigrationPro

MY customer already changed some content, else i wanted to make a brand new install and migrate again...

But it's strange : all modules disabled give the error message, but when i disable ALL non TB modules under the button "Performance" then there's no error message ?!

Link to comment
Share on other sites

  • 0

Its because the modules still load when they are disabled. I am betting there is something happening with the class name of one of the modules that is being seen as an exception. If you want, you can comment out that line for the time being, the uncomment it after you get done doing what you are doing.

Link to comment
Share on other sites

  • 0

@datakick : it's Perfect ! I just searched into the files from the directory /modules, and found which module is the problem ! :)

I didn't suspect that one, but it's the module "migrationpro" which i used for migrate the data.

I removed the directory of this module outside the /modules directory and everything is okay now !

And i have to admit : the TB community is very alive and very helpful ! in just ONE day, help for a good tip where to look for, and 10 posts, and that in just only 1 day :)

Link to comment
Share on other sites

  • 0

i disabled ALL modules, even the TB modules in the modules section !

Only when i disable all non-TB modules at "Performance" the error dis-appears.

the class is in /modules/migrationpro/classes/loggers/Logger.php Line 29 : class Logger { public function addErrorLog($log, $entityType) etc...

Link to comment
Share on other sites

  • 0

i contacted migrationpro, and have this answer :

"I have checked it. The problem relates to TB. TB is using Logger class, but this class and PHP file does not exists. "

I checked the TB core files, they have changed the file : classes/controller/AdminController.php and changed "Logger" into "PrestaShopLogger"

I think TB uses the class Logger in more files ? ( i sure know the class exists ! )

Also i think this won't be changed in the Core files ??

Link to comment
Share on other sites

  • 0

Yes, thirty bees uses class Logger. Quite a lot, a quick count brought up 110 usages.

It's also true that there is no class Logger. Logger is an alias to class PrestaShopLogger. Such aliases are defined here: https://github.com/thirtybees/thirtybees/blob/1.0.x/classes/PrestaShopAutoload.php#L49-L53

And here's a discussion related to the topic: https://github.com/thirtybees/thirtybees/issues/652

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