von Papst Posted June 5, 2015 Share Posted June 5, 2015 I've upgraded from 1.5.6.2 to 1.6.0.14 and since upgrade store search is not working anymore. I've rebuilt index several times but it doesn't help. Any help appreciated. Link to comment Share on other sites More sharing options...
NemoPS Posted June 5, 2015 Share Posted June 5, 2015 Do you get any error?Were you using overrides for the search class? If not, I would try getting a clean .14 and replacing classes/Search.php and the SearchController.php file as well, in controllers/front/ Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Please explain what do you mean by "search is not working". Does the search result page return 0 results, or the results page gives an error, or the quick search list is not working, or is there something else? Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 When I enter search term in search field I get 0 results on page. BUT when on search results page and I enter SAME search term I get proper results. Any suggestions? You can try go to www.uniq4pet.eu and enter search term pegus. Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Looks like you are using instant search? Preferences -> Search ->Search -> Instant search set to Yes? On the homepage of your website, there is a javascript error: Error: ReferenceError: comparedProductsIds is not definedSource File: https://www.uniq4pet.eu/themes/theme1184/cache/v_15_751f1d5c3624b0ee6ccd4dfa1bb14f62.jsLine: 418 And as there is javascript error, other script is not executed thus instant search is not working. On other pages, e.g. category page, instant search is working. Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 So should I set instant search to off? Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Please try to turn it off and lets see how that works. Although you still should correct that javascript error. Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 Well if I was the author of JS I would. OK now I got Ajax search enabled and instant search disabled. Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Still no good... Have you tried Nemo1 suggestion? Do you have any search related overrides? Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 Changed as suggested but no luck. Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Please open the file cache/class_index.php, find the code like the one below, and paste it here. 'Search' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'SearchController' => array ( 'path' => 'override/controllers/front/SearchController.php', 'type' => 'class', 'override' => false, ), 'SearchControllerCore' => array ( 'path' => 'controllers/front/SearchController.php', 'type' => 'class', 'override' => false, ), 'SearchCore' => array ( 'path' => 'classes/Search.php', 'type' => 'class', 'override' => false, ), 'SearchEngine' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'SearchEngineCore' => array ( 'path' => 'classes/SearchEngine.php', 'type' => 'class', 'override' => false, ), Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 Checked this part of the code. There are no overrides there and code is as you suggested. Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 There is on override In the code I provided. Ar you saying your code is exactly the same as mine? Also, is your custom template designed for PS 1.6 or were you using it on PS 1.5 ? Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 Now it is your code as you proposed. No improvements. (I cleared cache and enable force recompilation to make sure). Template is developed for PS 1.6 on version 1.5 I had other template. Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Sorry, maybe I was not clear before, but I am not asking to put my code into your file. I wanted you to show me a fragment of your code from your file. Please undo all the changes you made to the file. You can simple delete that file, because it's a cache file and will be generated automatically. Link to comment Share on other sites More sharing options...
von Papst Posted June 5, 2015 Author Share Posted June 5, 2015 Here it is. 'Search' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'SearchController' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'SearchControllerCore' => array ( 'path' => 'controllers/front/SearchController.php', 'type' => 'class', 'override' => false, ), 'SearchCore' => array ( 'path' => 'classes/Search.php', 'type' => 'class', 'override' => false, ), 'SearchEngine' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'SearchEngineCore' => array ( 'path' => 'classes/SearchEngine.php', 'type' => 'class', 'override' => false, ), Link to comment Share on other sites More sharing options...
pishkus Posted June 5, 2015 Share Posted June 5, 2015 Have you tried switching to the default theme? Maybe the search in the default theme will be working fine, so we would know that the problem is with the template, not the core files... Link to comment Share on other sites More sharing options...
von Papst Posted June 6, 2015 Author Share Posted June 6, 2015 Also tried. Doesn't work. I also had different 1.6 template for the shop and there also didn't work. Link to comment Share on other sites More sharing options...
von Papst Posted June 6, 2015 Author Share Posted June 6, 2015 Today I tried and it is working. don't ask me how and why but it works. I didn't change anything. if you just enter search words it works. If you hit enter it doesn't. Weird. Link to comment Share on other sites More sharing options...
von Papst Posted June 6, 2015 Author Share Posted June 6, 2015 Got it! It was a faulty NGINX configuration to blame! Now everything works perfectly. Link to comment Share on other sites More sharing options...
Dev Franco Posted July 23, 2015 Share Posted July 23, 2015 Hi, The ajax search in my home page is not working. It works perfectly in all other pages. On entering the search keyword, request url is http://localhost/prestashop/en/search.html?q=mixtu&limit=10×tamp=1437633759429&ajaxSearch=1&id_lang=1 which is wrong, It must be http://localhost/prestashop/en/search?q=mixtu&limit=10×tamp=1437633759429&ajaxSearch=1&id_lang=1 . There should not be any .html .Why does it happens? Please help me. Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2015 Share Posted July 24, 2015 Hard to inspect since you're on localhost.WHat if you disable ajax? Just to check if it's a pure javascript issue, or it's the variable being overridden there 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