lordmicro Posted January 6, 2014 Share Posted January 6, 2014 (edited) Hello! I upgraded from version 1.4.5.1 to the latest 1.5.6.1 Search stopped working and Russian language became transliterated. When requesting a "втулка" to write something like: Nothing found for your search "vtulka". Problem was solved by updating controllers/front/SearchController.php to the latest version ofGitHub. Removed only line $this->addColorsToProductList(...); My diff: [spam-filter] -88,16 [spam-filter],22 [spam-filter] $this->productSort(); $this->n = abs((int)(Tools::getValue('n', Configuration::get('PS_PRODUCTS_PER_PAGE')))); $this->p = abs((int)(Tools::getValue('p', 1))); + $original_query = Tools::safeOutput($query); $query = Tools::replaceAccentedChars(urldecode($query)); $search = Search::find($this->context->language->id, $query, $this->p, $this->n, $this->orderBy, $this->orderWay); + foreach ($search['result'] as &$product) + $product['link'] .= (strpos($product['link'], '?') === false ? '?' : '&').'search_query='.urlencode($query).'&results='.(int)$search['total']; Hook::exec('actionSearch', array('expr' => $query, 'total' => $search['total'])); $nbProducts = $search['total']; $this->pagination($nbProducts); $this->context->smarty->assign(array( 'products' => $search['result'], // DEPRECATED (since to 1.4), not use this: conflict with block_cart module 'search_products' => $search['result'], 'nbProducts' => $search['total'], - 'search_query' => $query, + 'search_query' => $original_query, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')))); } else if (($tag = urldecode(Tools::getValue('tag'))) && !is_array($tag)) The problem was solved with the conclusion. But the search is not earned. Did reindexing the search base. Search earned, but bad. I use the localizer prestalab.ru. I use there Lingua_Stem_Ru. Before the update worked perfectly. After the upgrade of the goods by screening requests are. Search list of aliases that is configured in the admin is not working out. Started looking. Found commit: [] BO : improved unicode characters replacement in URLs (Russian and Ukrainian characters added). I rolled this commit changes and it is my happiness. Now the search is working perfectly again. What is the meaning of this commit? P.S. Sorry for my English. Use translator Google. Для русских тема тут. Edited January 6, 2014 by lordmicro (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts