lucatd Posted December 29, 2020 Share Posted December 29, 2020 Ciao a tutti dal passaggio PS 1.6 a PS 1.7.ci siamo accorti che la barra di ricerca del negozio non mostra i risultati... si tratta di una PS 1.7.6.9 con un template warehouse nella sua ultima versione. Quando si attiva la modalità di debug, vediamo questi errori: [PrestaShopDatabaseException] Key 'id_product' doesn't exist in table 'product_attribute_shop'<br /><br /><pre>SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`name`, image_shop.`id_image` id_image, il.`legend`, m.`name` manufacturer_name ,( SELECT SUM(weight) FROM ps_search_word sw LEFT JOIN ps_search_index si ON sw.id_word = si.id_word WHERE sw.id_lang = 1 AND sw.id_shop = 1 AND si.id_product = p.id_product AND (sw.word LIKE '%tazza%') ) position, DATEDIFF( p.`date_add`, DATE_SUB( "2020-12-29 00:00:00", INTERVAL 20 DAY ) ) > 0 new, product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, IFNULL(product_attribute_shop.`id_product_attribute`,0) id_product_attribute FROM ps_product p INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) INNER JOIN `ps_product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = 1 AND pl.id_shop = 1 ) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop FORCE INDEX (id_product) ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1) LEFT JOIN ps_stock_available stock ON (stock.id_product = `p`.id_product AND stock.id_product_attribute = 0 AND stock.id_shop = 1 AND stock.id_shop_group = 0 ) LEFT JOIN `ps_manufacturer` m FORCE INDEX (PRIMARY) ON m.`id_manufacturer` = p.`id_manufacturer` LEFT JOIN `ps_image_shop` image_shop FORCE INDEX (id_product) ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 1) WHERE p.`id_product` IN (364,365,367,368) GROUP BY product_shop.id_product ORDER BY position desc LIMIT 0,24</pre> at line 769 in file classes/db/Db.php 764. if ($webservice_call && $errno) { 765. $dbg = debug_backtrace(); 766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97); 767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) { 768. if ($sql) { 769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>'); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. } DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 613 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 374 - classes/Search.php] - [3 Arguments] SearchCore::find - [line 85 - src/Adapter/Search/SearchProductSearchProvider.php] - [9 Arguments] PrestaShop\PrestaShop\Adapter\Search\SearchProductSearchProvider->runQuery - [line 307 - classes/controller/ProductListingFrontController.php] - [2 Arguments] ProductListingFrontControllerCore->getProductSearchVariables - [line 580 - classes/controller/ProductListingFrontController.php] ProductListingFrontControllerCore->doProductSearch - [line 82 - controllers/front/listing/SearchController.php] - [2 Arguments] SearchControllerCore->initContent - [line 292 - classes/controller/Controller.php] ControllerCore->run - [line 515 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Ho fatto pure l'indicizzazione dei prodotti: Quote I prodotti "indicizzati" sono stati analizzati da PrestaShop e appariranno nei risultati di una ricerca nel front office. Prodotti indicizzati 149 / 149. ma continua a non funzionare. Ho provato a cercare sul forum ma non ho trovato nulla. Qualcuno può darmi una mano? Grazie Luca Link to comment Share on other sites More sharing options...
ziobudda Posted December 29, 2020 Share Posted December 29, 2020 e' come se mancasse una colonna in una tabella. Ora pero' non ho un PS sottomano per controllare. M. Link to comment Share on other sites More sharing options...
ziobudda Posted December 29, 2020 Share Posted December 29, 2020 Forse ti ho trovato la soluzione. Mi devi solo 50€ per la consulenza. Sembra che manchi un indice e non una colonna. M. 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