Bonjour,
j'ai un pb avec criteria search.
Pour être sur, je l'ai désinstallé et réinstallé.
C'est une histoire de Warning: Undefined array key,
alors oui je sais qu'il faut mettre des default:null partout, ce que j'ai fait.
D'abord voici la stack trace :
ErrorException:
Warning: Undefined array key 1
at local/modules/CriteriaSearch/Loop/CriteriaSearchAttributeLoop.php:110
at CriteriaSearch\Loop\CriteriaSearchAttributeLoop->parseResults()
(vendor/thelia/core/lib/Thelia/Core/Template/Element/BaseLoop.php:558)
at Thelia\Core\Template\Element\BaseLoop->exec()
(local/modules/TheliaSmarty/Template/Plugins/TheliaLoop.php:196)
at TheliaSmarty\Template\Plugins\TheliaLoop->theliaLoop()
(var/cache/dev/smarty/compile/ab4050c221f0daf1a1a41f35ec25e9b12d096bb1_0.file.category-edit.html.php:54)
at content_63c69f185baf05_11937463()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
at Smarty_Template_Resource_Base->getRenderedTemplateCode()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
at Smarty_Template_Compiled->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216)
at Smarty_Internal_Template->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:238)
at Smarty_Internal_TemplateBase->_execute()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116)
at Smarty_Internal_TemplateBase->fetch()
(local/modules/TheliaSmarty/Template/SmartyParser.php:512)
at TheliaSmarty\Template\SmartyParser->internalRenderer()
(local/modules/TheliaSmarty/Template/SmartyParser.php:540)
at TheliaSmarty\Template\SmartyParser->render()
(vendor/thelia/core/lib/Thelia/Core/Hook/BaseHook.php:163)
at Thelia\Core\Hook\BaseHook->render()
(local/modules/CriteriaSearch/Hook/Admin/CategoryEditHook.php:23)
at CriteriaSearch\Hook\Admin\CategoryEditHook->onCategoryTabContent()
(vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
(vendor/symfony/event-dispatcher/EventDispatcher.php:206)
at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
(vendor/symfony/event-dispatcher/EventDispatcher.php:56)
at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
(vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:127)
at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
(local/modules/TheliaSmarty/Template/Plugins/Hook.php:111)
at TheliaSmarty\Template\Plugins\Hook->processHookFunction()
(local/modules/TheliaSmarty/Template/AbstractSmartyPlugin.php:116)
at TheliaSmarty\Template\AbstractSmartyPlugin->__call()
(var/cache/dev/smarty/compile/0352f2f3e80847e15e116b05a2e24b54ff8ff239_0.file.module-tab-content.html.php:26)
at content_63c69c42366004_41696693()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
at Smarty_Template_Resource_Base->getRenderedTemplateCode()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
at Smarty_Template_Compiled->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216)
at Smarty_Internal_Template->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:385)
at Smarty_Internal_Template->_subTemplateRender()
(var/cache/dev/smarty/compile/03f6cd2c8b232169f320d2b0a994e271e06b2eb3_0.file.category-edit.html.php:702)
at Block_177140868563c69c42000b77_12488627->callBlock()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:248)
at Smarty_Internal_Runtime_Inheritance->callBlock()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:184)
at Smarty_Internal_Runtime_Inheritance->process()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:186)
at Smarty_Internal_Runtime_Inheritance->process()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:156)
at Smarty_Internal_Runtime_Inheritance->instanceBlock()
(var/cache/dev/smarty/compile/5218c217e109d719102f5937c056592811a3aac2_0.file.admin-layout.tpl.php:298)
at content_63c69bfeb98761_30691443()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
at Smarty_Template_Resource_Base->getRenderedTemplateCode()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
at Smarty_Template_Compiled->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216)
at Smarty_Internal_Template->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:385)
at Smarty_Internal_Template->_subTemplateRender()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php:116)
at Smarty_Internal_Runtime_Inheritance->endChild()
(var/cache/dev/smarty/compile/03f6cd2c8b232169f320d2b0a994e271e06b2eb3_0.file.category-edit.html.php:71)
at content_63c69c4204aa47_14281732()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123)
at Smarty_Template_Resource_Base->getRenderedTemplateCode()
(vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114)
at Smarty_Template_Compiled->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:216)
at Smarty_Internal_Template->render()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:238)
at Smarty_Internal_TemplateBase->_execute()
(vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116)
at Smarty_Internal_TemplateBase->fetch()
(local/modules/TheliaSmarty/Template/SmartyParser.php:512)
at TheliaSmarty\Template\SmartyParser->internalRenderer()
(local/modules/TheliaSmarty/Template/SmartyParser.php:540)
at TheliaSmarty\Template\SmartyParser->render()
(vendor/thelia/core/lib/Thelia/Controller/Admin/BaseAdminController.php:391)
at Thelia\Controller\Admin\BaseAdminController->renderRaw()
(vendor/thelia/core/lib/Thelia/Controller/Admin/BaseAdminController.php:347)
at Thelia\Controller\Admin\BaseAdminController->render()
(vendor/thelia/core/lib/Thelia/Controller/Admin/CategoryController.php:239)
at Thelia\Controller\Admin\CategoryController->renderEditionTemplate()
(vendor/thelia/core/lib/Thelia/Controller/Admin/AbstractCrudController.php:428)
at Thelia\Controller\Admin\AbstractCrudController->updateAction()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:74)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/thelia/core/lib/Thelia/Core/TheliaHttpKernel.php:72)
at Thelia\Core\TheliaHttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:184)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/thelia/core/lib/Thelia/Core/Thelia.php:438)
at Thelia\Core\Thelia->handle()
(web/index_dev.php:43)
Pour moi, il y a un problème avec le fichier /backOffice/default/criteria-search/category/category-edit.html,
j'ai réduit le fichier au minimum pour avoir :
{loop type="search_attribute" name="search_attribute_loop2" }
<td>{$ID|default:null}</td>
{/loop}
Et que ce soit avec le paramètre category ou sans je recois le message d'erreur cité plus haut
Notez que si j'enlève ce code ou celui lié aux attributes,
le module s'affiche bien mais n'est pas (évidemment) utilisable.
C'est peut être moi qui rate un truc mais si c'est le cas je vois pas.
Last edited by vz777 (19-01-2023 14:42:17)