Jump to content

Bug after updating Customer Reassurance [blockreassurance v4.1.0]

Recommended Posts

Posted (edited)


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 by mikeshop (see edit history)

Share this post

Link to post
Share on other sites

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;


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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