Password protected cms pages override problem

Good morning, I've purchased the "Password protected CMS pages" module but after download and install it Prestashop show me this error: "Error! Impossibile enable il modulo passcms. Impossibile installare l'override: Il metodo initContent nella classe CmsController è già stato annullato." In English: "Error! The passcms module could not be enabled. The override can not be installed: The initContent method in the CmsController class has already been canceled." How can I fix this ? My Prestashop version is: 1.7.4.4 Thank you


Hello,
The message you attached means that your shop already uses a module that changes the way of how cms pages behave.
Module to protect CMS pages uses an override of controller named "cmsController". While you tried to install this module in your shop prestashop identified another override that was added tos hop previously with other addon. This is not an issue of the "password protected cms pages" module nor the module that applied an override in the past. This is how prestashop works.

How to solve the problem?
it depends on your requirements. There are two solutions:
  1. you do not want to use module that applied an override in the past
    in this case it will be enough to just uninstall the module that applied an override previously. Once you will do this - you will be able to install the module you purchased without any problem,.
  2. you want to use both modules - "password protected cms" and module that applied override in the past
    in this case it will be required to merge two overrides into one.
    original override file: /override/controllers/CmsController.php
    with module file: /modules/passcms/overrides/controller/CmsController.php
    then you will be able to install second module (pass protected cms pages).

if you are not tech-savvy i offer my help regarding to override merge process.
Password protected cms pages override problem Password protected cms pages override problem Reviewed by VEKIA on Sunday, January 20, 2019 Rating: 5

No comments