Jump to content

Error after adding images in blockreassurance prestashop 1.7.7.2


dolec

Recommended Posts

Got error in prestashop installation in blockreassurance after changing images adding item

 

1/1) ContextErrorException

Warning: finfo_file(/home/dasgsthxff/domains/libra.h2g.pl/public_html/modules/home/dasgsthxff/domains/libra.h2g.pl/public_html/blockreassurance/home/dasgsthxff/domains/libra.h2g.pl/public_html/views/home/dasgsthxff/domains/libra.h2g.pl/public_html/img/home/dasgsthxff/domains//public_html/img_perso/home/dasgsthxff/domains/libra.h2g.pl/public_html/belka mielenie-02.png): failed to open stream: No such file or directory

in ImageManager.php line 382

at ImageManagerCore::getMimeType('/home/dasgsthxff/domains/libra.h2g.pl/public_html/modules/home/dasgsthxff/domains/libra.h2g.pl/public_html/blockreassurance/home/dasgsthxff/domains/libra.h2g.pl/public_html/views/home/dasgsthxff/domains/libra.h2g.pl/public_html/img/home/dasgsthxff/domains/libra.h2g.pl/public_html/img_perso/home/dasgsthxff/domains/libra.h2g.pl/public_html/belka mielenie-02.png')in ReassuranceActivity.php line 190

at ReassuranceActivity::getAllBlockByStatus(2, 1)in blockreassurance.php line 517

at blockreassurance->renderTemplateInHook('displayBlockProduct.tpl')in blockreassurance.php line 409

at blockreassurance->hookdisplayReassurance(array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 990

at HookCore::coreCallHook(object(blockreassurance), 'hookDisplayReassurance', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 414

at HookCore::callHookOn(object(blockreassurance), 'displayReassurance', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 927

at HookCore::exec('displayReassurance', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1), null)in smarty.config.inc.php line 167

at smartyHook(array('h' => 'displayReassurance'), object(SmartyDevTemplate))in SmartyLazyRegister.php line 83

at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayReassurance'), object(SmartyDevTemplate)))in 7866740c2c2e87b5bfde596cc724f7c22a643e9b_2.file.product.tpl.php line 958

at Block_2648494526048971fb56069_38862147->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_2648494526048971fb56069_38862147), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_2648494526048971fb56069_38862147), object(Block_1852011664604800ca3bdea0_90916181))in smarty_internal_runtime_inheritance.php line 186

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_1852011664604800ca3bdea0_90916181))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_1852011664604800ca3bdea0_90916181', 'content', 1)in 3fe5c68d67dd87fc39bb08bfd52eb82e594bd1da_2.file.layout-full-width.tpl.php line 99

at Block_1382762707604800ca3bdb30_86171251->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_1382762707604800ca3bdb30_86171251), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_1382762707604800ca3bdb30_86171251), object(Block_889379247604800ca3d0051_51609292))in smarty_internal_runtime_inheritance.php line 186

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_889379247604800ca3d0051_51609292))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_889379247604800ca3d0051_51609292', 'content_wrapper')in f98214079ccc98005dba28fdcfdd649fbc8e6ee1_2.file.layout-both-columns.tpl.php line 130

at content_604800ca3d2f27_88851981(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'alysumlayouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 116

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in 3fe5c68d67dd87fc39bb08bfd52eb82e594bd1da_2.file.layout-full-width.tpl.php line 42

at content_604800ca3be647_25053402(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-full-width.tpl', null, 'alysumlayouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 116

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-full-width.tpl')in 7866740c2c2e87b5bfde596cc724f7c22a643e9b_2.file.product.tpl.php line 54

at content_6048971fba4338_49517773(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232

at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'alysumlayouts/layout-full-width.tpl', null, 0)in smarty_internal_templatebase.php line 116

at Smarty_Internal_TemplateBase->fetch('catalog/product.tpl', null, 'alysumlayouts/layout-full-width.tpl', null, false, true, false)in SmartyDev.php line 40

at SmartyDev->fetch('catalog/product.tpl', null, 'alysumlayouts/layout-full-width.tpl')in FrontController.php line 704

at FrontControllerCore->smartyOutputContent('catalog/product.tpl')in FrontController.php line 686

at FrontControllerCore->display()in Controller.php line 326

at ControllerCore->run()in Dispatcher.php line 518

at DispatcherCore->dispatch()in index.php line 28

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

OK ça viens de fonctionner en désactivant et réactivant le module ! Après l'avoir désinstallé réinstallé, puis vidé le cache.

 

OK it just worked by deactivating and reactivating the module! Before Itried uninstalling it reinstalled, then emptied the cache.

Edited by Wineguru (see edit history)
Link to comment
Share on other sites

  • 4 months later...

i solved the issue by removing a condition in the ReasuranceActivity.php

i commented on github as well

https://github.com/PrestaShop/blockreassurance/commit/37d0fb1eafe8c227281e12e9a1422980b0d76816#commitcomment-60858987

 public static function getAllBlockByStatus($id_lang = 1, $id_shop = 1)
    {
        $sql = 'SELECT * FROM `' . _DB_PREFIX_ . 'psreassurance` pr
            LEFT JOIN ' . _DB_PREFIX_ . 'psreassurance_lang prl ON (pr.id_psreassurance = prl.id_psreassurance)
            WHERE prl.id_lang = "' . (int) $id_lang . '" 
                AND prl.id_shop = "' . (int) $id_shop . '"
                AND pr.status = 1
            ORDER BY pr.position';

        $result = Db::getInstance()->executeS($sql);

        foreach ($result as &$item) {
            $item['is_svg'] = !empty($item['custom_icon']);
          /*   {* removed this && (ImageManager::getMimeType(str_replace(__PS_BASE_URI__, _PS_ROOT_DIR_ .
            
DIRECTORY_SEPARATOR, $item['custom_icon'])) == 'image/svg'); *}
       */ }

        return $result;
    }
}

image.thumb.png.8f665f199dad5578418863605e35117f.png

Edited by Doumakii (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 2 months later...

blockreassurance 5.1.0 is out, but this bug is still out there...

I did not want to remove the check that Doumakii is removing, so I've found a solution on the git repository of the module :

https://github.com/PrestaShop/blockreassurance/pull/328/commits/68005820a21e74952e9dfdf4a957c0a6894c622d

It is not yet merged, so you will have to change the code yourself :)

This fixed the issue for me.

  • Like 1
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...