THELIA Forum

Welcome to the THELIA support and discusssion forum

Offline


Je comprend pas cette erreur sachant que j'ai utiliser le hook home.body au début de mon développement après je me suis rendu compte qu'il me faut les hook de login donc j'ai supprimer le tag de ce hook dans mon config.xml et la methode qu'il appel et du coup je comprend pas pourquoi il m'affiche cette erreur:

InvalidArgumentException in RegisterHookListenersPass.php line 69:
Method onHomeBody does not exist in Thelia\Core\Hook\DefaultHook : exception 'ReflectionException' with message 'Method Thelia\Core\Hook\DefaultHook::onHomeBody() does not exist' in C:\xampp\htdocs\shop\core\lib\Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass.php:369
Stack trace:
#0 C:\xampp\htdocs\shop\core\lib\Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass.php(369): ReflectionMethod->__construct('Thelia\\Core\\Hoo...', 'onHomeBody')
#1 C:\xampp\htdocs\shop\core\lib\Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass.php(130): Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass->isValidHookMethod('Thelia\\Core\\Hoo...', 'onHomeBody', false)
#2 C:\xampp\htdocs\shop\core\lib\Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass.php(93): Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass->registerHook('Thelia\\Core\\Hoo...', Object(Thelia\Model\Module), 'hookproductsoff...', Array)
#3 C:\xampp\htdocs\shop\core\lib\Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass.php(60): Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass->processHook(Object(Thelia\Core\TheliaContainerBuilder), Object(Symfony\Component\DependencyInjection\Definition))
#4 C:\xampp\htdocs\shop\core\vendor\symfony\dependency-injection\Compiler\Compiler.php(107): Thelia\Core\DependencyInjection\Compiler\RegisterHookListenersPass->process(Object(Thelia\Core\TheliaContainerBuilder))
#5 C:\xampp\htdocs\shop\core\vendor\symfony\dependency-injection\ContainerBuilder.php(589): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Thelia\Core\TheliaContainerBuilder))
#6 C:\xampp\htdocs\shop\core\lib\Thelia\Core\TheliaContainerBuilder.php(32): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#7 C:\xampp\htdocs\shop\core\lib\Thelia\Core\Thelia.php(500): Thelia\Core\TheliaContainerBuilder->customCompile()
#8 C:\xampp\htdocs\shop\core\vendor\symfony\http-kernel\Kernel.php(510): Thelia\Core\Thelia->buildContainer()
#9 C:\xampp\htdocs\shop\core\vendor\symfony\http-kernel\Kernel.php(133): Symfony\Component\HttpKernel\Kernel->initializeContainer()
#10 C:\xampp\htdocs\shop\core\lib\Thelia\Core\Thelia.php(219): Symfony\Component\HttpKernel\Kernel->boot()
#11 C:\xampp\htdocs\shop\core\vendor\symfony\http-kernel\Kernel.php(182): Thelia\Core\Thelia->boot()
#12 C:\xampp\htdocs\shop\web\index_dev.php(36): Symfony\Component\HttpKernel\Kernel->handle(Object(Thelia\Core\HttpFoundation\Request))
#13 {main}

Offline


Vide le cache.

Si ça ne suffit pas, resette les hooks de ton module.

php Thelia hook:clean NomDeTonModule


OpenStudio Toulouse

Offline


Il m'affiche la même erreur même après le resette des hooks de mon module