Fix prestashop search module not working

How to fix prestashop search module not working

Search
No results found for your search “Product ABC”

Check php error from terminal console

#tail -f /var/log/apache2/error.log
..........................................................
[Sun Jun 04 05:19:28 2017] [error] [client 192.168.1.10] PHP Warning: preg_replace(): Compilation failed: disallowed Unicode code point (>= 0xd800 && <= 0xdfff) at offset 1829 in /var/www/classes/Search.php on line 84, referer: http://myprestashopweb.com/admin55/index.php?tab=AdminSearchConf&token=a20b3bdcb31d9a2bdcc064e53eb8487d&conf=4
..........................................................

Solutions;

Open and edit file Search.php (classes/Search.php)

vim /var/www/classes/Search.php

Find line 56:

'\x{a806}\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}'

Solve it by replace to;

'\x{a806}\x{a80b}\x{a823}-\x{a82b}\x{e000}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}'

Or only replaced;

d800 to e000

Save and restart apache

Then go to administrator -> preferences -> search
Click
-> Add missing products to index and
-> Re-build entire index.
Save

Leave a Reply

Your email address will not be published. Required fields are marked *