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


Question

Posted

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

17 answers to this question

Recommended Posts

  • 1
Posted

@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
  • 0
Posted

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"

  • 0
Posted

only 3 modules - disable the ones in the list - test these modules individually - limit the problem

Live Shop? Test Shop?

No matter - probably it is often the active cache. Empty the cache and try again!

Test Shop -> disable cache

  • 0
Posted

It's a TEST shop :)

I disabled all 3 non thirty bees modules Performance -> Force compilation -> Cache NO and Cleared the Cache But error message keeps coming...

  • 0
Posted

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 ?!

  • 0
Posted

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.

  • 0
Posted

@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 :)

  • 0
Posted

How can i mark this topic as SOLVED ?

I also send a support ticket to migrationpro to let them know about this bug, and referred them to this topic.

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

All this said, I wonder why this module feels a need to implement a class for writing log messages. Using the one in core should work fine. And it exists since at least PS 1.5.

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