Jump to content
MarcKromann

Fatal error: Undefined class constant 'CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST'

Recommended Posts

I'm getting an error message when I try to access the dashboard on Prestashop V 1.5

Fatal error: Undefined class constant 'CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST' in /home/www/globe.dk/classes/controller/AdminController.php on line 1544.

 

This is what it looks like in AdminController.php on line 1544

{
        if (!$this->isFresh(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 86400))
            file_put_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, Tools::addonsRequest('native'));
        
        libxml_use_internal_errors(true);
        $country_module_list = file_get_contents(_PS_ROOT_DIR_.Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
        if (!empty($country_module_list) && is_string($country_module_list) && $country_module_list_xml = simplexml_load_string($country_module_list))
        {
            $country_module_list_array = array();
            if (isset($country_module_list_xml->module))
                foreach ($country_module_list_xml->module as $k => $m)
                    $country_module_list_array[] = (string)$m->name;
            $this->tab_modules_list['slider_list'] = array_intersect($this->tab_modules_list['slider_list'], $country_module_list_array);
        }
        
        if (is_array($this->tab_modules_list['slider_list']) && count($this->tab_modules_list['slider_list']))
            $this->toolbar_btn['modules-list'] = array(
                'href' => '#',
                'desc' => $this->l('Modules List')
            );
    }

 

I am very inexperienced with this, so any idea on how to fix it will be very appreciated, thanks.

Edited by MarcKromann
Added version of PS (see edit history)

Share this post


Link to post
Share on other sites

I presume your server had an update ?  If you are using PS 1.5. you should consider to update your shop to a newer version of PS (1.6.latest or 1.7.)

Share this post


Link to post
Share on other sites

No update, no. I tried updating, then it froze in the middle of the process and showed a blank screen. After some talk with the hosting provider, it got reverted back and I could acces the dash again.


I updated the page logo, and tried turning on smarty cache when it came with the error message it is showing now. Can't access dash, can't access site.

Would love to upgrade, but I cannot access anything.

Share this post


Link to post
Share on other sites

Make a rollback of your site and do not play with cache. Ask your provider, if they maintain day back-ups.

Share this post


Link to post
Share on other sites

If you are not able to upgrade your shop, then check if your server fulfil min. requirements before. Instead of to use 1-click-module you can also use a migration service or tool.

migration modules:

https://addons.prestashop.com/en/search?search_query=migration

migration services:

https://www.shopping-cart-migration.com/

 

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

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More