mikeshop Posted October 4, 2019 Share Posted October 4, 2019 (edited) Hello, I just updated the module but now I get a fatal error 500, whereas before everything worked fine Here is the error with debug mode: (1/1) ClassNotFoundException Attempted to load class "ReassuranceActivity" from the global namespace. Did you forget a "use" statement? in blockreassurance.php line 526 And in Apache log: [Fri Oct 04 17:27:54.892957 2019] [:error] [pid 23382] [client ] PHP Fatal error: Uncaught Error: Class 'ReassuranceActivity' not found in /var/www/myshop.com/modules/blockreassurance/blockreassurance.php:526\nStack trace:\n#0 /var/www/myshop.com/modules/blockreassurance/blockreassurance.php(418): blockreassurance->renderTemplateInHook('displayBlockPro...')\n#1 /var/www/myshop.com/classes/Hook.php(966): blockreassurance->hookdisplayReassurance(Array)\n#2 /var/www/myshop.com/classes/Hook.php(351): HookCore::coreCallHook(Object(blockreassurance), 'hookdisplayReas...', Array)\n#3 /var/www/myshop.com/classes/Hook.php(903): HookCore::callHookOn(Object(blockreassurance), 'displayReassura...', Array)\n#4 /var/www/myshop.com/config/smarty.config.inc.php(165): HookCore::exec('displayReassura...', Array, NULL)\n#5 /var/www/myshop.com/classes/Smarty/SmartyLazyRegister.php(83): smartyHook(Array, Object(Smarty_Internal_Template))\n#6 /var/www/myshop.com/var/cache/prod/smarty/compile/layouts_layout_full_width_tpl/0b/7d/b3/0b7db36c15959g46cb5c0ed4d9b48318e27d24fa_2.file.cart.tpl.php(150): in /var/www/myshop.com/modules/blockreassurance/blockreassurance.php on line 526 Line 526 of php file: 'blocks' => ReassuranceActivity::getAllBlockByStatus($id_lang, $this->context->shop->id), What I have done: - Reset - Uninstall / Reinstall - Empty the cache in the backoffice and /var/cache I using: Prestashop v1.7.5.2 PHP v7.0 Any solution ? Thanks you Edited October 4, 2019 by mikeshop (see edit history) Link to comment Share on other sites More sharing options...
mikeshop Posted October 4, 2019 Author Share Posted October 4, 2019 Ok i found the problem You need to add manually this code in your blockreassurance.php juste before "use PrestaShop\PrestaShop\Core\Module\WidgetInterface;" because the update system does not do it automatically $autoloadPath = __DIR__ . '/vendor/autoload.php'; if (file_exists($autoloadPath)) { require_once $autoloadPath; } Link to comment Share on other sites More sharing options...
brka Posted October 4, 2019 Share Posted October 4, 2019 Thank you! Link to comment Share on other sites More sharing options...
Hessam Posted February 26, 2020 Share Posted February 26, 2020 I have the same issue with core files. I've upgraded from 1.7.5.2 to 1.7.6.3 and now I have this error fo CmsPageController. Really when I click on it it redirects to the dashboard. I figured out that the problem is from loading this class. Do you have any suggestion please? thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now