THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Sur un Thelia 2.3.5 l’installation du module Customer family pante les fiches clients en BO à la création ou simplement à la consultation. Le module n'est pas configurable non plus. Voici le message:
BadMethodCallException in CustomerFamily.php line 2635: Call to undefined method: getCategoryRestrictionEnabled.

   in CustomerFamily.php line 2635
    at CustomerFamily->__call('getCategoryRestrictionEnabled', array()) in CustomerFamilyLoop.php line 99
    at CustomerFamilyLoop->parseResults(object(LoopResult)) in BaseLoop.php line 540
    at BaseLoop->exec(null) in TheliaLoop.php line 156
    at TheliaLoop->theliaLoop(array('name' => 'customer_family', 'type' => 'customer_family'), null, object(Smarty_Internal_Template), true) in smarty_internal_templatebase.php(157) : eval()'d code line 88
    at content_5ebcb727398ec8_09473458(object(Smarty_Internal_Template)) in smarty_internal_templatebase.php line 188
    at Smarty_Internal_TemplateBase->fetch('file:/var/www/html/thelia/local/modules/CustomerFamily/templates/backOffice/default/customer-edit.html') in SmartyParser.php line 381
    at SmartyParser->internalRenderer('file', '/var/www/html/thelia/local/modules/CustomerFamily/templates/backOffice/default/customer-edit.html', array('location' => 'customer-edit', 'customer_id' => '1', 'locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => '1', 'current_url' => 'http://192.168.0.2/thelia/web/index_dev … tomer_id=1', 'app' => object(stdClass)), true) in SmartyParser.php line 424
    at SmartyParser->render('/var/www/html/thelia/local/modules/CustomerFamily/templates/backOffice/default/customer-edit.html', array('location' => 'customer-edit', 'customer_id' => '1', 'locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => '1', 'current_url' => 'http://192.168.0.2/thelia/web/index_dev … tomer_id=1', 'app' => object(stdClass))) in BaseHook.php line 140
    at BaseHook->render('customer-edit.html', array('location' => 'customer-edit', 'customer_id' => '1')) in BaseHook.php line 100
    at BaseHook->insertTemplate(object(HookRenderEvent), 'hook.2.customer.edit', object(ContainerAwareEventDispatcher))
    at call_user_func(array(object(DefaultHook), 'insertTemplate'), object(HookRenderEvent), 'hook.2.customer.edit', object(ContainerAwareEventDispatcher)) in EventDispatcher.php line 181
    at EventDispatcher->doDispatch(array(array(object(DefaultHook), 'insertTemplate')), 'hook.2.customer.edit', object(HookRenderEvent)) in EventDispatcher.php line 46
    at EventDispatcher->dispatch('hook.2.customer.edit', object(HookRenderEvent)) in Hook.php line 106
    at Hook->processHookFunction(array('name' => 'customer.edit', 'location' => 'customer-edit', 'customer_id' => '1'), object(Smarty_Internal_Template)) in smarty_internal_templatebase.php(157) : eval()'d code line 830
    at content_5ebcb7270fcc66_83992320(object(Smarty_Internal_Template)) in smarty_internal_templatebase.php line 188
    at Smarty_Internal_TemplateBase->fetch('file:customer-edit.html') in SmartyParser.php line 381
    at SmartyParser->internalRenderer('file', 'customer-edit.html', array('customer_id' => '1', 'page' => '1', 'page_order' => '1', 'edit_language_id' => '1', 'edit_language_locale' => 'fr_FR', 'edit_currency_id' => '1', 'locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => '1', 'current_url' => 'http://192.168.0.2/thelia/web/index_dev … tomer_id=1', 'app' => object(stdClass)), true) in SmartyParser.php line 424
    at SmartyParser->render('customer-edit.html', array('customer_id' => '1', 'page' => '1', 'page_order' => '1', 'edit_language_id' => '1', 'edit_language_locale' => 'fr_FR', 'edit_currency_id' => '1', 'locale' => 'fr_FR', 'lang_code' => 'fr', 'lang_id' => '1', 'current_url' => 'http://192.168.0.2/thelia/web/index_dev … tomer_id=1', 'app' => object(stdClass))) in BaseAdminController.php line 390
    at BaseAdminController->renderRaw('customer-edit.html', array('customer_id' => '1', 'page' => '1', 'page_order' => '1', 'edit_language_id' => '1', 'edit_language_locale' => 'fr_FR', 'edit_currency_id' => '1')) in BaseAdminController.php line 346
    at BaseAdminController->render('customer-edit', array('customer_id' => '1', 'page' => '1', 'page_order' => '1')) in CustomerController.php line 219
    at CustomerController->renderEditionTemplate() in AbstractCrudController.php line 409
    at AbstractCrudController->updateAction()
    at call_user_func_array(array(object(CustomerController), 'updateAction'), array()) in HttpKernel.php line 139
    at HttpKernel->handleRaw(object(Request), '1') in HttpKernel.php line 62
    at HttpKernel->handle(object(Request), '1', true) in TheliaHttpKernel.php line 76
    at TheliaHttpKernel->handle(object(Request), '1', true) in ParamInitMiddleware.php line 87
    at ParamInitMiddleware->handle(object(Request), '1', true) in SessionMiddleware.php line 80
    at SessionMiddleware->handle(object(Request), '1', true) in StackedHttpKernel.php line 23
    at StackedHttpKernel->handle(object(Request), '1', true) in Kernel.php line 185
    at Kernel->handle(object(Request)) in index_dev.php line 38

Last edited by PLG (15-05-2020 14:45:54)

Offline


En mettant la ligne 2635 en commentaire "//throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name));" le module semble fonctionner.

Offline


Ça ne résoudra pas réellement le problème. C'est un peu comme débrancher l'alarme incendie sans éteindre le feu.

La version 1.5.4 du module résous le problème : https://github.com/thelia-modules/Custo … /tag/1.5.4


OpenStudio Toulouse

Offline


Ok, de ce pas j'y vais.

Offline


D'un autre pas je reviens: un message  d'erreur différent est apparu et impossible d'activer le module (Cannot fetch TableMap for undefined table phpName: \CustomerFamily\Model\CustomerFamilyAvailableCategory.)

Offline

Offline


Cela ne change rien. L’installation se passe bien mais l'activation n'est pas possible. J'ai mis les caches DEV et PROD clean avant et après et j'ai essayé en mode utilisateur ou dev rien ne change.

Voici ce que j'ai en log:
255: ERROR [ModuleController.php:toggleActivationAction()] {261} 2020-05-15 10:59:48: Failed to activate/deactivate module:
256: ERROR [ModuleController.php:toggleActivationAction()] {261} 2020-05-15 10:59:48: Cannot fetch TableMap for undefined table phpName: \CustomerFamily\Model\CustomerFamilyAvailableCategory.
#0 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(635): Propel\Runtime\Map\DatabaseMap->getTableByPhpName('\\CustomerFamily...')
#1 /var/www/html/thelia/local/modules/CustomerFamily/Model/Map/CustomerFamilyTableMap.php(185): Propel\Runtime\Map\TableMap->addRelation('CustomerFamilyA...', '\\CustomerFamily...', 2, Array, 'CASCADE', 'CASCADE', 'CustomerFamilyA...')
#2 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(689): CustomerFamily\Model\Map\CustomerFamilyTableMap->buildRelations()
#3 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(673): Propel\Runtime\Map\TableMap->getRelations()
#4 /var/www/html/thelia/local/modules/CustomerFamily/Model/Base/CustomerFamilyQuery.php(942): Propel\Runtime\Map\TableMap->getRelation('CustomerFamilyI...')
#5 /var/www/html/thelia/local/modules/CustomerFamily/Model/Base/CustomerFamilyQuery.php(977): CustomerFamily\Model\Base\CustomerFamilyQuery->joinCustomerFamilyI18n(NULL, 'LEFT JOIN')
#6 /var/www/html/thelia/local/modules/CustomerFamily/CustomerFamily.php(105): CustomerFamily\Model\Base\CustomerFamilyQuery->useCustomerFamilyI18nQuery()
#7 /var/www/html/thelia/local/modules/CustomerFamily/CustomerFamily.php(57): CustomerFamily\CustomerFamily::getCustomerFamilyByCode('particular', 'Particulier', 'fr_FR')
#8 /var/www/html/thelia/core/lib/Thelia/Module/BaseModule.php(86): CustomerFamily\CustomerFamily->postActivation(Object(Propel\Runtime\Connection\ConnectionWrapper))
#9 /var/www/html/thelia/core/lib/Thelia/Action/Module.php(68): Thelia\Module\BaseModule->activate(Object(Thelia\Model\Module))
#10 [internal function]: Thelia\Action\Module->toggleActivation(Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent), 'thelia.module.t...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#11 /var/www/html/thelia/core/vendor/symfony/event-dispatcher/EventDispatcher.php(181): call_user_func(Array, Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent), 'thelia.module.t...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /var/www/html/thelia/core/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#13 /var/www/html/thelia/core/lib/Thelia/Controller/BaseController.php(120): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#14 /var/www/html/thelia/core/lib/Thelia/Controller/Admin/ModuleController.php(251): Thelia\Controller\BaseController->dispatch('thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#15 [internal function]: Thelia\Controller\Admin\ModuleController->toggleActivationAction('35')
#16 /var/www/html/thelia/core/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Array, Array)
#17 /var/www/html/thelia/core/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Thelia\Core\HttpFoundation\Request), 1)
#18 /var/www/html/thelia/core/lib/Thelia/Core/TheliaHttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#19 /var/www/html/thelia/core/lib/Thelia/Core/Stack/ParamInitMiddleware.php(87): Thelia\Core\TheliaHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#20 /var/www/html/thelia/core/lib/Thelia/Core/Stack/SessionMiddleware.php(80): Thelia\Core\Stack\ParamInitMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#21 /var/www/html/thelia/core/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Thelia\Core\Stack\SessionMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#22 /var/www/html/thelia/core/vendor/symfony/http-kernel/Kernel.php(185): Stack\StackedHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#23 /var/www/html/thelia/web/index_dev.php(38): Symfony\Component\HttpKernel\Kernel->handle(Object(Thelia\Core\HttpFoundation\Request))
#24 {main}
1: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT VERSION() as version, @@SESSION.sql_mode as session_sql_mode
2: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT config.ID, config.NAME, config.VALUE, config.SECURED, config.HIDDEN, config.CREATED_AT, config.UPDATED_AT FROM `config` WHERE config.NAME='session_config.lifetime' LIMIT 1
3: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT config.ID, config.NAME, config.VALUE, config.SECURED, config.HIDDEN, config.CREATED_AT, config.UPDATED_AT FROM `config` WHERE config.NAME='session_config.save_path' LIMIT 1
4: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT config.ID, config.NAME, config.VALUE, config.SECURED, config.HIDDEN, config.CREATED_AT, config.UPDATED_AT FROM `config` WHERE config.NAME='customer_remember_me_cookie_name' LIMIT 1
5: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT config.ID, config.NAME, config.VALUE, config.SECURED, config.HIDDEN, config.CREATED_AT, config.UPDATED_AT FROM `config` WHERE config.NAME='rewriting_enable' LIMIT 1
6: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT `ID`, `CODE`, `VERSION`, `TYPE`, `CATEGORY`, `ACTIVATE`, `POSITION`, `FULL_NAMESPACE`, `MANDATORY`, `HIDDEN`, `CREATED_AT`, `UPDATED_AT` FROM `module` WHERE `ID` = '35'
7: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT lang.ID, lang.TITLE, lang.CODE, lang.LOCALE, lang.URL, lang.DATE_FORMAT, lang.TIME_FORMAT, lang.DATETIME_FORMAT, lang.DECIMAL_SEPARATOR, lang.THOUSANDS_SEPARATOR, lang.ACTIVE, lang.VISIBLE, lang.DECIMALS, lang.BY_DEFAULT, lang.POSITION, lang.CREATED_AT, lang.UPDATED_AT FROM `lang`
8: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: UPDATE `module` SET `ACTIVATE`=1, `UPDATED_AT`='2020-05-15 11:00:57' WHERE module.ID=35
9: INFO [ConnectionWrapper.php:log()] {653} 2020-05-15 11:00:57: SELECT customer_family.ID, customer_family.CODE, customer_family.CATEGORY_RESTRICTION_ENABLED, customer_family.BRAND_RESTRICTION_ENABLED, customer_family.IS_DEFAULT, customer_family.CREATED_AT, customer_family.UPDATED_AT FROM `customer_family` LIMIT 1
10: ERROR [ModuleController.php:toggleActivationAction()] {261} 2020-05-15 11:00:57: Failed to activate/deactivate module:
11: ERROR [ModuleController.php:toggleActivationAction()] {261} 2020-05-15 11:00:57: Cannot fetch TableMap for undefined table phpName: \CustomerFamily\Model\CustomerFamilyAvailableCategory.
#0 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(635): Propel\Runtime\Map\DatabaseMap->getTableByPhpName('\\CustomerFamily...')
#1 /var/www/html/thelia/local/modules/CustomerFamily/Model/Map/CustomerFamilyTableMap.php(185): Propel\Runtime\Map\TableMap->addRelation('CustomerFamilyA...', '\\CustomerFamily...', 2, Array, 'CASCADE', 'CASCADE', 'CustomerFamilyA...')
#2 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(689): CustomerFamily\Model\Map\CustomerFamilyTableMap->buildRelations()
#3 /var/www/html/thelia/core/vendor/propel/propel/src/Propel/Runtime/Map/TableMap.php(673): Propel\Runtime\Map\TableMap->getRelations()
#4 /var/www/html/thelia/local/modules/CustomerFamily/Model/Base/CustomerFamilyQuery.php(942): Propel\Runtime\Map\TableMap->getRelation('CustomerFamilyI...')
#5 /var/www/html/thelia/local/modules/CustomerFamily/Model/Base/CustomerFamilyQuery.php(977): CustomerFamily\Model\Base\CustomerFamilyQuery->joinCustomerFamilyI18n(NULL, 'LEFT JOIN')
#6 /var/www/html/thelia/local/modules/CustomerFamily/CustomerFamily.php(105): CustomerFamily\Model\Base\CustomerFamilyQuery->useCustomerFamilyI18nQuery()
#7 /var/www/html/thelia/local/modules/CustomerFamily/CustomerFamily.php(57): CustomerFamily\CustomerFamily::getCustomerFamilyByCode('particular', 'Particulier', 'fr_FR')
#8 /var/www/html/thelia/core/lib/Thelia/Module/BaseModule.php(86): CustomerFamily\CustomerFamily->postActivation(Object(Propel\Runtime\Connection\ConnectionWrapper))
#9 /var/www/html/thelia/core/lib/Thelia/Action/Module.php(68): Thelia\Module\BaseModule->activate(Object(Thelia\Model\Module))
#10 [internal function]: Thelia\Action\Module->toggleActivation(Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent), 'thelia.module.t...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#11 /var/www/html/thelia/core/vendor/symfony/event-dispatcher/EventDispatcher.php(181): call_user_func(Array, Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent), 'thelia.module.t...', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher))
#12 /var/www/html/thelia/core/vendor/symfony/event-dispatcher/EventDispatcher.php(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, 'thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#13 /var/www/html/thelia/core/lib/Thelia/Controller/BaseController.php(120): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#14 /var/www/html/thelia/core/lib/Thelia/Controller/Admin/ModuleController.php(251): Thelia\Controller\BaseController->dispatch('thelia.module.t...', Object(Thelia\Core\Event\Module\ModuleToggleActivationEvent))
#15 [internal function]: Thelia\Controller\Admin\ModuleController->toggleActivationAction('35')
#16 /var/www/html/thelia/core/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Array, Array)
#17 /var/www/html/thelia/core/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Thelia\Core\HttpFoundation\Request), 1)
#18 /var/www/html/thelia/core/lib/Thelia/Core/TheliaHttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#19 /var/www/html/thelia/core/lib/Thelia/Core/Stack/ParamInitMiddleware.php(87): Thelia\Core\TheliaHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#20 /var/www/html/thelia/core/lib/Thelia/Core/Stack/SessionMiddleware.php(80): Thelia\Core\Stack\ParamInitMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#21 /var/www/html/thelia/core/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Thelia\Core\Stack\SessionMiddleware->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#22 /var/www/html/thelia/core/vendor/symfony/http-kernel/Kernel.php(185): Stack\StackedHttpKernel->handle(Object(Thelia\Core\HttpFoundation\Request), 1, true)
#23 /var/www/html/thelia/web/index_dev.php(38): Symfony\Component\HttpKernel\Kernel->handle(Object(Thelia\Core\HttpFoundation\Request))
#24 {main}

Last edited by PLG (15-05-2020 10:18:02)

Offline


Ha OK, j'ai compris.

La version 1.5.5 devrait résoudre ce problème.


OpenStudio Toulouse

Offline


Parfait, merci.