THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

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

Offline


La page de résultats de la recherche Thelia me renvoie l'erreur suivante:

PropelException: Unable to execute COUNT statement [SELECT COUNT(*) FROM (SELECT product.ID, product.TAX_RULE_ID, product.REF, product.VISIBLE, product.POSITION, product.TEMPLATE_ID, product.BRAND_ID, product.CREATED_AT, product.UPDATED_AT, product.VERSION, product.VERSION_CREATED_AT, product.VERSION_CREATED_BY, ROUND(CASE WHEN `pse`.PROMO=1 THEN `price`.PROMO_PRICE ELSE `price`.PRICE END, 2) AS real_price, `price`.PRICE AS price, `price`.PROMO_PRICE AS promo_price, NOT ISNULL(`requested_locale_i18n`.`ID`) AS IS_TRANSLATED, `requested_locale_i18n`.`TITLE` AS i18n_TITLE, `requested_locale_i18n`.`CHAPO` AS i18n_CHAPO, `requested_locale_i18n`.`DESCRIPTION` AS i18n_DESCRIPTION, `requested_locale_i18n`.`POSTSCRIPTUM` AS i18n_POSTSCRIPTUM, `requested_locale_i18n`.`META_TITLE` AS i18n_META_TITLE, `requested_locale_i18n`.`META_DESCRIPTION` AS i18n_META_DESCRIPTION, `requested_locale_i18n`.`META_KEYWORDS` AS i18n_META_KEYWORDS, `pse`.ID AS pse_id, `pse`.NEWNESS AS is_new, `pse`.PROMO AS is_promo, `pse`.QUANTITY AS quantity, `pse`.WEIGHT AS weight, `pse`.EAN_CODE AS ean_code, COUNT(`pse_count`.ID) AS pse_count FROM `product` INNER JOIN `product_sale_elements` `pse` ON (product.ID=pse.PRODUCT_ID AND `pse`.IS_DEFAULT=1) INNER JOIN `product_sale_elements` `pse_count` ON (product.ID=pse_count.PRODUCT_ID) LEFT JOIN `product_price` `price` ON (pse.ID=price.PRODUCT_SALE_ELEMENTS_ID AND `price`.`currency_id` = :p1) INNER JOIN `product_i18n` `requested_locale_i18n` ON (product.ID=requested_locale_i18n.ID AND `requested_locale_i18n`.LOCALE = :p2) WHERE CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END LIKE :p3 AND product.VISIBLE=:p4 GROUP BY product.ID) propelmatch4cnt]

Je suis preneur de la moindre piste car je sèche complètement.

J'utilise Thelia 2.0.3

Offline


Il y a un message supplémentaire qui te donne la cause de l'erreur, en principe.


OpenStudio Toulouse

Offline


Suite du message d'erreur

in /var/vhosts/scoot-company/core/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/Criteria.php line 2324
at Criteria->doCount(object(ConnectionWrapper)) in /var/vhosts/scoot-company/core/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php line 1246
at ModelCriteria->doCount(object(ConnectionWrapper)) in /var/vhosts/scoot-company/core/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php line 1226
at ModelCriteria->count() in /var/vhosts/scoot-company/core/lib/Thelia/Core/Template/Element/BaseLoop.php line 388
at BaseLoop->count() in /var/vhosts/scoot-company/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php line 99
at TheliaLoop->theliaCount(array('type' => 'product', 'title' => 'Allure'), object(Smarty_Internal_Template)) in /var/vhosts/scoot-company/cache/dev/smarty/compile/a977b4cc55cf942bdf2a3370b1c0502099c4446c.file.search.html.php line 185
at content_545b6fbd9536e4_54947962(object(Smarty_Internal_Template)) in /var/vhosts/scoot-company/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php line 180
at Smarty_Internal_TemplateBase->fetch('file:search.html') in /var/vhosts/scoot-company/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php line 332
at SmartyParser->internalRenderer('file', 'search.html', array()) in /var/vhosts/scoot-company/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php line 348
at SmartyParser->render('search.html') in /var/vhosts/scoot-company/core/lib/Thelia/Core/EventListener/ViewListener.php line 73
at ViewListener->onKernelView(object(GetResponseForControllerResultEvent))
at call_user_func(array(object(ViewListener), 'onKernelView'), object(GetResponseForControllerResultEvent)) in /var/vhosts/scoot-company/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 164
at EventDispatcher->doDispatch(array(array(object(ViewListener), 'beforeKernelView'), array(object(ViewListener), 'onKernelView')), 'kernel.view', object(GetResponseForControllerResultEvent)) in /var/vhosts/scoot-company/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php line 53
at EventDispatcher->dispatch('kernel.view', object(GetResponseForControllerResultEvent)) in /var/vhosts/scoot-company/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php line 167
at ContainerAwareEventDispatcher->dispatch('kernel.view', object(GetResponseForControllerResultEvent)) in /var/vhosts/scoot-company/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 134
at HttpKernel->handleRaw(object(Request), '1') in /var/vhosts/scoot-company/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php line 73
at HttpKernel->handle(object(Request), '1', true) in /var/vhosts/scoot-company/core/lib/Thelia/Core/TheliaHttpKernel.php line 81
at TheliaHttpKernel->handle(object(Request), '1', true) in /var/vhosts/scoot-company/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php line 197
at Kernel->handle(object(Request)) in /var/vhosts/scoot-company/web/index_dev.php line 37

Offline


Normalement, il y en a encore après.


OpenStudio Toulouse

Offline


Voici ce que j'ai trouvé de plus dans les logs :

1: ERROR [Propel.php:log()] {284} 2014-11-25 13:38:09:SQLSTATE[42S22]: Column not found: 1054 Unknown column 'default_locale_i18n.TITLE' in 'where clause'

Du coup je suis allé voir dans la configuration des langues en BO. La langue par défaut du site est le français. En début d'intégration j'ai indiqué dans la section "Paramètres" > Si une traduction est manquante ou incomplète  = ''Utiliser strictement la langue demandée'.

En réglant dette option sur 'Remplacer par la langue par défaut' cela à résolu mon problème.