Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Raymond

Cannot make static method error when installing a module

Recommended Posts

Hello

I tried to install this module for the gdpr, after upload to install TB output this error:

[PrestaShop] Fatal error in module file :C:\wamp64\www\Prestatester\modules\gdprpro\src\CustomObjectModel.php:
Cannot make static method ObjectModelCore::createDatabase() non static in class CustomObjectModel

I tried to install this same module on PS 1.6.1.21 and 1.7 and works fine.

What can I do to have this module working on TB?

Thank you

Regards

Share this post


Link to post
Share on other sites

Search and replace all occurrences of createDatabase with createDatabaseCustom in module php files

Share this post


Link to post
Share on other sites

Thank you

I tried that, I get a similar error, difference is this instead of  "Cannot make static method ObjectModelCore::createDatabase()" outputs  " Cannot make static method ObjectModelCore::dropDatabase()"

here below the entire error string I get

[PrestaShop] Fatal error in module file :C:\wamp64\www\Prestatester\modules\gdprpro\src\CustomObjectModel.php:
Cannot make static method ObjectModelCore::dropDatabase() non static in class CustomObjectModel

Regards

Share this post


Link to post
Share on other sites

the same fix applies, but this time replace all occurrences of  dropDatabase with dropDatabaseCustom

Share this post


Link to post
Share on other sites

Hi

Thank you


Following same principle then I had to change in the same way a bunch of other similar commands.

Seems that is working now, at least is installed and I can go into the configuration page.

Hope that works .. going to test...

Regards

Share this post


Link to post
Share on other sites

I seems that work fine so far (have its own lacks and defects but that's another matter)

Thank you

Share this post


Link to post
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

×