Jump to content

PS 1.7.8.7 BO produit : 'moduleCardController' has already been declared : RESOLU


gouna

Recommended Posts

Bonjour,
Je viens de mettre à jour ma boutique PS 1.7.6.8 vers 1.7.8.7.
 

J'ai un message d'erreur dans la console sur mes fiches produit :

"Uncaught SyntaxError: Identifier 'moduleCardController' has already been declared (at module_card.js?1.7.8.7:1:1)"

Cela n'a pas l'air de cause de problème particulier, mais je me permets de demander s'il y aurait une solution.

Merci.

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

Inside ps_mbo module, in function hookActionAdminControllerSetMedia(), change 

$this->context->controller->addJs(
                    rtrim(__PS_BASE_URI__, '/')
                    . str_ireplace(
                        _PS_CORE_DIR_,
                        '',
                        _PS_BO_ALL_THEMES_DIR_
                    )
                    . 'default/js/bundle/module/module_card.js?v='
                    . _PS_VERSION_
                );

to 

if($this->context->controller->php_self !== 'AdminProducts'){
                $this->context->controller->addJs(
                    rtrim(__PS_BASE_URI__, '/')
                    . str_ireplace(
                        _PS_CORE_DIR_,
                        '',
                        _PS_BO_ALL_THEMES_DIR_
                    )
                    . 'default/js/bundle/module/module_card.js?v='
                    . _PS_VERSION_
                );
            }
  • Thanks 1
Link to comment
Share on other sites

  • gouna changed the title to PS 1.7.8.7 BO produit : 'moduleCardController' has already been declared : RESOLU

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