Jump to content

problème frontcontroller php


Recommended Posts

j'ai une erreur fatal et j'ai pas trouver de solution.

voici le message afficher en mode debug

Fatal error: Uncaught Error: Call to undefined method Configuration::isCatalogMode() in /home/ishoptl/www/classes/controller/FrontController.php:1634 Stack trace: #0 /home/ishoptl/www/classes/controller/FrontController.php(554): FrontControllerCore->getTemplateVarConfiguration() #1 /home/ishoptl/www/classes/controller/FrontController.php(614): FrontControllerCore->assignGeneralPurposeVariables() #2 /home/ishoptl/www/controllers/front/IndexController.php(38): FrontControllerCore->initContent() #3 /home/ishoptl/www/classes/controller/Controller.php(319): IndexControllerCore->initContent() #4 /home/ishoptl/www/classes/Dispatcher.php(510): ControllerCore->run() #5 /home/ishoptl/www/index.php(28): DispatcherCore->dispatch() #6 {main} thrown in /home/ishoptl/www/classes/controller/FrontController.php on line 1634

Link to comment
Share on other sites

Quelle version Presta ?

Avez-vous un override sur la classe Configuration ?

Normalement la classe Configuration contient ces lignes:

    /**
     * @return bool
     */
    public static function isCatalogMode()
    {
        return Configuration::get('PS_CATALOG_MODE')
            || !Configuration::showPrices()
            || (
                is_a(Context::getContext()->controller, 'FrontController')
                && Context::getContext()->controller->getRestrictedCountry() == Country::GEOLOC_CATALOG_MODE
            );
    }

 

Link to comment
Share on other sites

  • 2 weeks later...

If you have a backup or access to a fresh installation of the same PrestaShop version, you can check whether the Configuration class in that version contains the isCatalogMode() method. If it's missing in your current installation, you might need to add or restore it.

class Configuration extends ConfigurationCore {
public static function isCatalogMode()
{
return Configuration::get('PS_CATALOG_MODE')
|| !Configuration::showPrices()
|| (
is_a(Context::getContext()->controller, 'FrontController')
&& Context::getContext()->controller->getRestrictedCountry() == Country::GEOLOC_CATALOG_MODE
);
}
}
If the error persists, you might want to temporarily comment out or bypass the call to isCatalogMode() in the FrontController.php to check if there are any further underlying issues.

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