patrmich Posted September 24, 2010 Share Posted September 24, 2010 Hi,When I make a search in the on line shop, I am getting the following message :Warning: Invalid argument supplied for foreach() in /var/www/vhost/myshop.com/home/html/classes/Search.php on line 190On the admin - Preferences - Search - Indexation, I have the following message :Indexed products: 0 / 8.-> Add missing products to index.-> Re-build entire index.If I press either on Add missing products to index or Re-build entire index. I get the here after error message :Can't find file: 'ps_search_word' (errno: 2)Thank you in advance for any help in this matter.Patrick Link to comment Share on other sites More sharing options...
rocky Posted September 25, 2010 Share Posted September 25, 2010 It seems the ps_search_word table is missing from your database. My guess is that you upgraded from an older version of PrestaShop that didn't have the ps_search_word table, and that upgrade failed, so that table was never created. Link to comment Share on other sites More sharing options...
patrmich Posted September 25, 2010 Author Share Posted September 25, 2010 Hi,Thank you for your reply.I downloaded the last Prestashop available version last July.Since July, I had no time to start to build my shop. So, I started the building two days ago. I only added one item to the demo shop.Is there a way to check that ps_search_word table is missing from my database ?Besides this error, I have another one on the admin home page :Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/vhost/myshop.com/home/html/modules/statshome/statshome.php on line 139Is there any link between the two problems ?Thank you again in advance.Patrick Link to comment Share on other sites More sharing options...
rocky Posted September 25, 2010 Share Posted September 25, 2010 Possibly. You can log in to your cPanel and then choose phpMyAdmin in the Databases section to view all your database tables. Link to comment Share on other sites More sharing options...
patrmich Posted September 25, 2010 Author Share Posted September 25, 2010 Thank you for your reply.In Prestasho admin :in Back Office - Preferences - Database :There is only one database having the following prefux : ps_I also logged on the database on my server.Thera are tens of ps_ sub directoriesAmong them, are :ps_search_index and ps_search_wordWhen I press on the ps_search_index link, I get the following error message :Erreurrequête SQL: SHOW INDEX FROM `ps_search_index` ;MySQL a répondu:#1017 - Can't find file: 'ps_search_index' (errno: 2)When I press on the ps_search_word link, I get the following error message :Erreurrequête SQL: SHOW INDEX FROM `ps_search_word` ;MySQL a répondu:#1017 - Can't find file: 'ps_search_word' (errno: 2)When I press on the other directory links, they work (no error message).Thank you again in advance,Patrick Link to comment Share on other sites More sharing options...
patrmich Posted September 25, 2010 Author Share Posted September 25, 2010 I am adding here below some other pieces of informationI checked the other ps_ sub directories. most are working but some have error or alert messagesps_connectionsErreurMySQL a répondu:#1194 - Table 'ps_connections' is marked as crashed and should be repairedps_connections_page linkErreurMySQL a répondu:#1194 - Table 'ps_connections_page' is marked as crashed and should be repairedWhen I press on the ps_customer_group link, I get the following alert message :La colonne `id_customer` ne devrait pas faire partie à la fois d'une clé primaire et d'une clé indexps_guest link,Erreurrequête SQL: SHOW INDEX FROM `ps_guest` ;MySQL a répondu:#1194 - Table 'ps_guest' is marked as crashed and should be repairedps_hook_moduleLa colonne `id_module` ne devrait pas faire partie à la fois d'une clé primaire et d'une clé indexps_image_langLa colonne `id_image` ne devrait pas faire partie à la fois d'une clé unique et d'une clé indexps_module_currencyLa colonne `id_module` ne devrait pas faire partie à la fois d'une clé primaire et d'une clé indexps_pagenotfoundrequête SQL: SHOW INDEX FROM `ps_pagenotfound` ;MySQL a répondu:#1194 - Table 'ps_pagenotfound' is marked as crashed and should be repairedps_page_viewedrequête SQL: SHOW INDEX FROM `ps_page_viewed` ;MySQL a répondu:#1194 - Table 'ps_page_viewed' is marked as crashed and should be repairedps_search_indexrequête SQL: SHOW INDEX FROM `ps_search_index` ;MySQL a répondu:#1017 - Can't find file: 'ps_search_index' (errno: 2)ps_search_wordErreurrequête SQL: SHOW INDEX FROM `ps_search_word` ;MySQL a répondu:#1017 - Can't find file: 'ps_search_word' (errno: 2)Thank you again in advance,Patrick Link to comment Share on other sites More sharing options...
rocky Posted September 26, 2010 Share Posted September 26, 2010 It seems some of your database tables got corrupted for some reason. Try logging in to phpMyAdmin, then clicking on the "Repair table" link on the "Operations" tab of each table that has an error message. Link to comment Share on other sites More sharing options...
patrmich Posted September 27, 2010 Author Share Posted September 27, 2010 [sOLVED]Hi,Finally to solve the matter I fully re-installed Prestashop and everything works fine.Thank you again for all your previous replys.Patrick Link to comment Share on other sites More sharing options...
Slot-bg Posted October 28, 2010 Share Posted October 28, 2010 And you call this as [sOLVED]? If you have 1000 products and you have to loose all of them and just re-install prestashop. Link to comment Share on other sites More sharing options...
roastchicken Posted January 18, 2011 Share Posted January 18, 2011 This is not solved I have a corrupt ps_search_index table.. is this table required ? can I delete Link to comment Share on other sites More sharing options...
rocky Posted January 18, 2011 Share Posted January 18, 2011 I think that table is required for autocomplete to work, or at least search. You could try going to Preferences > Search and re-building the search index. Link to comment Share on other sites More sharing options...
roastchicken Posted January 18, 2011 Share Posted January 18, 2011 tried re-building but get error:Array( [0] => Incorrect information in file: './limeligh_psdb/ps_search_index.frm' [1] => Array ( [0] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'ipod' AND id_lang = 1 LIMIT 1),10) [1] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'nano' AND id_lang = 1 LIMIT 1),10) [2] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'new' AND id_lang = 1 LIMIT 1),3) [3] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'design' AND id_lang = 1 LIMIT 1),2) [4] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'features' AND id_lang = 1 LIMIT 1),1) [5] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'now' AND id_lang = 1 LIMIT 1),1) [6] => (1,(SELECT id_word FROM ps_search_word WHERE word = '8gb' AND id_lang = 1 LIMIT 1),1) [7] => (1,(SELECT id_word FROM ps_search_word WHERE word = '16gb' AND id_lang = 1 LIMIT 1),1) [8] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'rocks' AND id_lang = 1 LIMIT 1),1) [9] => (1,(SELECT id_word FROM ps_search_word WHERE word = 'like' AND id_lang = 1 LIMIT 1),1) ))END Link to comment Share on other sites More sharing options...
rocky Posted January 18, 2011 Share Posted January 18, 2011 I guess you will have to delete the table first then. Make a backup of the table first just in case. Then re-build again. Link to comment Share on other sites More sharing options...
roastchicken Posted January 19, 2011 Share Posted January 19, 2011 It worked after your suggestion.thanks Link to comment Share on other sites More sharing options...
Recommended Posts