swissjah Posted October 6, 2016 Share Posted October 6, 2016 (edited) Bonjour a tous, Je réalise un prestashop pour une mercerie en ligne. >>> http://arrow-workshop.com Je ne suis pas débutant mais peu expérimenté en réseau et SQL. J'installe un prestashop sur un VPS de travail, le client rentre quelques 2000 produits ! Je migre le prestashop sur un mutualisé pro OVH + base de données privée (je sais c'est pas bien mais meilleur compromis entre le prix et mes compétences serveur limitées) Je transfère les fichiers et importe la base de données + modif de "shop_url" dans la BDD Je contrôle, tout semble fonctionner mais je m'aperçois dans le back office que je ne vois pas les pages CMS crées. Je continue de fouiller et je ne peux pas créer de produit. J'active le mode DEBUG et voici ce qui sort : [PrestaShopDatabaseException] Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'presta_.pac.id_product_attribute' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by SELECT pa.`id_product`, a.`color`, pac.`id_product_attribute`, 0 qty, a.`id_attribute`, al.`name`, IF(color = "", a.id_attribute, color) group_by FROM `ps_product_attribute` pa INNER JOIN ps_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1) JOIN `ps_product_attribute_combination` pac ON (pac.`id_product_attribute` = product_attribute_shop.`id_product_attribute`) JOIN `ps_attribute` a ON (a.`id_attribute` = pac.`id_attribute`) JOIN `ps_attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = 1) JOIN `ps_attribute_group` ag ON (a.id_attribute_group = ag.`id_attribute_group`) WHERE pa.`id_product` IN (2632) AND ag.`is_color_group` = 1 GROUP BY pa.`id_product`, a.`id_attribute`, `group_by` ORDER BY a.`position` ASC;at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) {787. $dbg = debug_backtrace();788. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793.794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 3459 - classes/Product.php] - [1 Arguments] ProductCore::getAttributesColorList - [line 1533 - modules/iqitcontentcreator/iqitcontentcreator.php] - [1 Arguments] Iqitcontentcreator->addColorsToProductList - [line 1170 - modules/iqitcontentcreator/iqitcontentcreator.php] - [1 Arguments] Iqitcontentcreator->buildSubmenuTree - [line 914 - modules/iqitcontentcreator/iqitcontentcreator.php] - [2 Arguments] Iqitcontentcreator->hookDisplayHome - [line 587 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 542 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 40 - controllers/front/IndexController.php] - [1 Arguments] IndexControllerCore->initContent - [line 189 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] La, cela commence à etre obscure pour moi car si je comprend que le problème semble venir de ps_product_attribute ; je ne sais pas trop quoi faire. J'ai essayé de créer un produit sur l'ancien serveur puis j'ai exporté la BDD. Supprimé complètement la BDD du nouveau et tout ré-importer depuis l'ancien serveur. Le nouveau produit apparait mais toujours les meme problèmes. Je suis dans l'impasse Une idée lumineuse ? Merci d'avance pour vos avis ! Edited October 12, 2016 by swissjah (see edit history) Link to comment Share on other sites More sharing options...
swissjah Posted October 7, 2016 Author Share Posted October 7, 2016 merci ndiaga pour ton aide mais cela ne change rien, j'ai toujours une erreur, mais c'est une autre erreur : [PrestaShopDatabaseException]Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'presta_.cl.link_rewrite' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by SELECT c.id_cms, cl.link_rewrite, cl.meta_title FROM ps_cms c LEFT JOIN ps_cms_lang cl ON (c.id_cms = cl.id_cms AND cl.id_lang = 1) INNER JOIN ps_cms_shop cms_shop ON (cms_shop.id_cms = c.id_cms AND cms_shop.id_shop = 1) WHERE 1 AND c.id_cms IN (6) AND c.`active` = 1 GROUP BY c.id_cms ORDER BY c.`position`at line 791 in file classes/db/Db.php 786. if ($webservice_call && $errno) {787. $dbg = debug_backtrace();788. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790. if ($sql) {791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792. }793.794. throw new PrestaShopDatabaseException($this->getMsgError());795. }796. } DbCore->displayError - [line 425 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 643 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 104 - classes/CMS.php] - [1 Arguments] CMSCore::getLinks - [line 5062 - modules/iqitmegamenu/iqitmegamenu.php] - [2 Arguments] IqitMegaMenu->transformToLink - [line 4984 - modules/iqitmegamenu/iqitmegamenu.php] - [4 Arguments] IqitMegaMenu->makeMegaMenu - [line 4382 - modules/iqitmegamenu/iqitmegamenu.php] - [1 Arguments] IqitMegaMenu->_prepareHook - [line 4297 - modules/iqitmegamenu/iqitmegamenu.php] - [1 Arguments] IqitMegaMenu->hookiqitMegaMenu - [line 587 - classes/Hook.php] - [1 Arguments] HookCore::coreCallHook - [line 542 - classes/Hook.php] - [3 Arguments] HookCore::exec - [line 205 - config/smarty.config.inc.php] - [3 Arguments] smartyHook - [line - ] - [2 Arguments] call_user_func_array - [line 268 - config/smarty.config.inc.php] - [2 Arguments] SmartyLazyRegister->__call - [line 293 - tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code] - [2 Arguments]Warning: file(/home/arrowworsn/www/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code): failed to open stream: No such file or directory in/home/arrowworsn/www/classes/exception/PrestaShopException.php on line 103Warning: array_slice() expects parameter 1 to be array, boolean given in /home/arrowworsn/www/classes/exception/PrestaShopException.php on line 110 SmartyLazyRegister->smartyHook - [line 293 - tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code] - [2 Arguments]Warning: file(/home/arrowworsn/www/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code): failed to open stream: No such file or directory in/home/arrowworsn/www/classes/exception/PrestaShopException.php on line 103Warning: array_slice() expects parameter 1 to be array, boolean given in /home/arrowworsn/www/classes/exception/PrestaShopException.php on line 110 content_57f7661269fe36_32644122 - [line 188 - tools/smarty/sysplugins/smarty_internal_templatebase.php] - [1 Arguments] Smarty_Internal_TemplateBase->fetch - [line 317 - classes/SmartyCustom.php] - [7 Arguments] Smarty_Custom_Template->fetch - [line 303 - tools/smarty/sysplugins/smarty_internal_template.php] - [7 Arguments] Smarty_Internal_Template->getSubTemplate - [line 38 - tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code] - [7 Arguments]Warning: file(/home/arrowworsn/www/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code): failed to open stream: No such file or directory in/home/arrowworsn/www/classes/exception/PrestaShopException.php on line 103Warning: array_slice() expects parameter 1 to be array, boolean given in /home/arrowworsn/www/classes/exception/PrestaShopException.php on line 110 content_57f7661247ed68_08144084 - [line 188 - tools/smarty/sysplugins/smarty_internal_templatebase.php] - [1 Arguments] Smarty_Internal_TemplateBase->fetch - [line 110 - classes/SmartyCustom.php] - [7 Arguments] SmartyCustomCore->fetch - [line 529 - classes/controller/Controller.php] - [1 Arguments] ControllerCore->smartyOutputContent - [line 723 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->display - [line 209 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] c'est quoi ce "sql_mode=only_full_group_by" qui semble poser problème ??? Link to comment Share on other sites More sharing options...
doekia Posted October 7, 2016 Share Posted October 7, 2016 L'erreur est pourtant lumineuse:SELECT list is not in GROUP BY clause and contains nonaggregated column 'presta_.cl.link_rewrite' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by incompatible with sql_mode=only_full_group_by Ceci signifie sûrement que ton hébergement est en MySQL 5.7 et prestashop n'est pas compatible, ni avec MySQL5.7, ni avec PHP 7 https://www.sitepoint.com/quick-tip-how-to-permanently-change-sql-mode-in-mysql/ Link to comment Share on other sites More sharing options...
Olecorre Posted October 7, 2016 Share Posted October 7, 2016 C'est ca doekia, le site est avec Mysql 5.7 swissjah voir sur ovh si tu avoir une bdd en 5.6 Link to comment Share on other sites More sharing options...
swissjah Posted October 7, 2016 Author Share Posted October 7, 2016 super merci a tous pour votre participation rapide, ca fait plaisir ! j'ai contacté OVH et la c'est une autre histoire (grrrrrrr les formalités admin) je vous tiens au courant Link to comment Share on other sites More sharing options...
swissjah Posted October 10, 2016 Author Share Posted October 10, 2016 C'etait bien ca messieurs ! Bravo pour votre efficacité. J'ai créer une base de donnée temporaire (pas sur le serveur privé) et ca fonctionne. Cela suffira en attendant qu'OVH me downgrade la base privée. Encore merci ! Benjamin Link to comment Share on other sites More sharing options...
swissjah Posted October 10, 2016 Author Share Posted October 10, 2016 PS : je ne trouve pas comment mettre le sujet en [resolu] Link to comment Share on other sites More sharing options...
Mediacom87 Posted October 10, 2016 Share Posted October 10, 2016 Bonjour, pas simple mais expliqué dans https://www.prestashop.com/forums/topic/256108-regles-du-forum-officiel-de-prestashop-et-conseils-dutilisation/ Quote Topic [Résolu]Si, après avoir posté dans un topic, vous trouvez une solution à votre problème, merci de venir le signaler et de décrire cette solution.De plus, si vous êtes l'auteur du topic pour lequel une solution a été apportée, éditer le premier post et ajouter la mention [Résolu] au début du titre.Pour marquer un topic comme [Résolu] :- Editer le premier post du topic en cliquant sur le bouton "Editer",- Cliquer sur le bouton "Utiliser l'éditeur complet",- Ajouter la mention "[Résolu] " au début du titre de votre topic et cliquez sur le bouton "Envoyer le message modifié". 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now