henribaeyens Posted June 22, 2010 Share Posted June 22, 2010 Une nouveauté. En allant sur l'onglet client, j'écope de ce message. Je met un echo dans la fonction getList de admintab.php pour voir la requête : SELECT SQL_CALC_FOUND_ROWS b.*, a.*, (YEAR(NOW()) - YEAR(birthday)) as age, ( SELECT c.date_add FROM guest g LEFT JOIN connections c ON c.id_guest = g.id_guest WHERE g.id_customer = a.id_customer ORDER BY c.date_add DESC LIMIT 1 ) as connect FROM `customer` a LEFT JOIN `customer_lang` b ON (b.`id_customer` = a.`id_customer` AND b.`id_lang` = 2) WHERE 1 AND a.`deleted` = 0 ORDER BY `date_add` DESC LIMIT 0,50 ceux qui sont un peu perspicaces auront vu d'où vient l'erreur : LEFT JOIN `customer_lang` b laquelle table n'existe pas. Je ne m'explique pas vraiment pourquoi ce join est inclut dans la requête. Normalement la fonction getlist, dans le contexte de admincustomer, ne devrait pas tenir compte de la langue (et donc ne pas faire un join sur table_lang)Curieux, non ? Link to comment Share on other sites More sharing options...
siki Posted July 13, 2010 Share Posted July 13, 2010 Bonjour,J'ai ce même problème "Requête SQL invalide" sur la page "Clients" du backoffice depuis le passage de la version 1... a la version 1.2.5.Aujourd'hui j'ai mis à jour vers la version 1.3.1 et le pbme est tjrs la.Avez vous trouvé comment résoudre ce pbme?Merci! Link to comment Share on other sites More sharing options...
henribaeyens Posted July 15, 2010 Author Share Posted July 15, 2010 il faut d'abord savoir pourquoi la requête est invalide. Il s'agit de faire un echo de $sql (AdminTab.php, fonction getList) et de lancer cette requête dans un autre environnement (phpmyadmin, terminal, ou sql query browser) afin de voir le message d'erreur qui en résulte. Ce diagnostique devrais vous aider à mettre le doigt sur le problème. Link to comment Share on other sites More sharing options...
SmartiesKiller Posted August 4, 2010 Share Posted August 4, 2010 haaaaaaaaaaaaaaa gros probleme j'ai voulu faire un mass update avec le module mass update et voila que je me retrouve avec cette erreur aussi !!!!!! Unknown column 'pl.name' in 'where clause' SELECT SQL_CALC_FOUND_ROWS b.*, a.*, cp.`position`, i.`id_image` FROM `ps_product` a LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 2) LEFT JOIN `ps_image` i ON (i.`id_product` = a.`id_product` AND i.`cover` = 1) LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = a.`id_product`) WHERE 1 AND cp.`id_category` = 1 AND pl.`name` LIKE '%corset%' ORDER BY `position` ASC LIMIT 0,300 Si cela peux aider.Merci d'avance. Link to comment Share on other sites More sharing options...
SmartiesKiller Posted August 4, 2010 Share Posted August 4, 2010 je m'auto reply:Je ne sais pas si ca va aider mais j'avais installé le module quick edit et j'avais fait une recherche dans ce module d'ou l'apparition du mot corset dans le post au dessus.Et en retrounant dans ce module,j'ai effacer le mot corset de la cellule de recherche et cliquer sur reinitialiser et la plus d'erreur dans le catalogue !?!?!?voilouu Link to comment Share on other sites More sharing options...
henribaeyens Posted August 4, 2010 Author Share Posted August 4, 2010 l'alias de la table product_lang est b, or la clause where fait référence à pl (pl.name) alors que cela devrait être b.name; d'où l'erreur sql. Link to comment Share on other sites More sharing options...
Rodolfo Posted March 18, 2011 Share Posted March 18, 2011 Sorry for answering in english, how did you fix this problem?Kind regardsRODOLFO Link to comment Share on other sites More sharing options...
henribaeyens Posted March 19, 2011 Author Share Posted March 19, 2011 the simplest thing is to echo the query (put an echo $sql in the getList method in classes/AdminTab.php), reload the page, copy the query and run it either from the mysql console or phpmyadmin. This'll give you more info as to the nature of the error. Link to comment Share on other sites More sharing options...
Rodolfo Posted March 23, 2011 Share Posted March 23, 2011 SELECT SQL_CALC_FOUND_ROWS b.*, a.*, cp.`position`, i.`id_image` FROM `ps_product` a LEFT JOIN `ps_product_lang` b ON (b.`id_product` = a.`id_product` AND b.`id_lang` = 3) LEFT JOIN `ps_image` i ON (i.`id_product` = a.`id_product` AND i.`cover` = 1) LEFT JOIN `ps_category_product` cp ON (cp.`id_product` = a.`id_product`) WHERE 1 AND cp.`id_category` = 114 AND pl.`name` LIKE '63%' ORDER BY `position` ASC LIMIT 0,50 Link to comment Share on other sites More sharing options...
henribaeyens Posted March 23, 2011 Author Share Posted March 23, 2011 what's wrong is pl.name. The product _lang alias is b, not pl, so the query should be '...AND b.`name` LIKE...' Link to comment Share on other sites More sharing options...
Rodolfo Posted March 23, 2011 Share Posted March 23, 2011 I am sorry, but I do not understand what and where I have to change things. Are you talking about any php file? What could make this happen?Thanks a lotRODOLFO Link to comment Share on other sites More sharing options...
henribaeyens Posted March 24, 2011 Author Share Posted March 24, 2011 what backoffice page is producing this error ? Which ps version are you using ? Link to comment Share on other sites More sharing options...
Rodolfo Posted March 24, 2011 Share Posted March 24, 2011 Hello, 1.2.5When I enter BO, the catalog, any subcategory, Ii is supposed I must see all the products listed in the category. I don't. I see this error.THank you Link to comment Share on other sites More sharing options...
henribaeyens Posted March 24, 2011 Author Share Posted March 24, 2011 in AdminProducts.php, in the construct method where the $this->fieldsDisplay array is initialized, check that the filter_key param for name is b!name. Otherwise attach the file so I can have a look at it. Has it been modified by anyone? Link to comment Share on other sites More sharing options...
Rodolfo Posted March 24, 2011 Share Posted March 24, 2011 'name' => array('title' => $this->l('Name'), 'width' => 277, 'filter_key' => 'b!name'),It has not been modified, since the installation.Rodolfo Link to comment Share on other sites More sharing options...
henribaeyens Posted March 24, 2011 Author Share Posted March 24, 2011 send the file Link to comment Share on other sites More sharing options...
Rodolfo Posted March 24, 2011 Share Posted March 24, 2011 there you are AdminProducts.php Link to comment Share on other sites More sharing options...
henribaeyens Posted March 24, 2011 Author Share Posted March 24, 2011 ok, yet another prestashop weirdness.can you PM me the credentials for temporary access to your BO ? FTP access would be useful as well.Rather, send those to contact[at]henribaeyens[dot]com Link to comment Share on other sites More sharing options...
Rodolfo Posted March 24, 2011 Share Posted March 24, 2011 Thank you Henry, I do not know why is ok now, I will look at home to see what the problem is.Thank you again 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