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

Hey folks,

I followed the same procedure and could install afterwards the GDPR module with success.

Anyhow some issues are still not solved. After coockie confirmation and clicking to any other link or reload the page, the same popup takes place. So the cookie confirmation popup appears every time, no matter if reload or jumping to any link (product on same server).

Software package:
- TB 1.1.0
- Theme: Panda
- Module: DSG-Konformität Pro v2.1.13 - von PrestaChamps

Any ideas how to solve that?

Thanks for all


BR
Alex

Share this post


Link to post
Share on other sites

Hello

I installed this module GDPR PRO now version v2.1.15 with TB1.2 + Panda theme v 1.5.5, presented same errors as described above, solved the issue in the same manner, the complete list of substitutions to be done is here below:

createDatabaseCustom instead of createDatabase

dropDatabaseCustom instead of dropDatabase

createMissingColumnsCustom instead of createMissingColumns

createColumnCustom instead of createColumn

getDatabaseColumnsCustom instead of getDatabaseColumns

After substituting all these words will be available for installation

After installation as ALM wrote above in fact seems that the acceptation of the policy is not saved, each time the visitor refresh the page or visit any other page the popup appears back.

This however is not a bug, after installation it is necessary to configure the module, in the configuration panel on the right top corner click on the "GDPR enabled modules" button, there set up at least one module to be shown to the client in the warning popup in the front office, save and go to the front office to check, the popup will appear, click on "more info" button, see how now the module you did setup is shown, then click accept, try to refresh the page or navigate in other pages, the popup should not appear any more.

Thank you

Edited by Raymond

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

×
×
  • Create New...