Search code examples
phpsearchmodxcyrilliclatin

Modx SimpleSearch: cyrillic not found


Description of Problem: There is a site on the Revo 2.4.2. Babel Installed with three contexts (Ru, Ua, En). Installed SimpleSearch 1.9.2. The problem is the inability to look cyrillic word (nothing found). Latin search is correct. Everywhere set UTF-8.

Expected Outcome: Start searching russian symbols.

  • MODX Version: 2.4.2
  • PHP Version: 5.4.45
  • Database Version: 5.5.46
  • Installed MODX Add-ons: Ace, Archivist, Articles, Babel, BreadCrumb, FAQ Manager, filedownload, getPage, getResources, GoogleSiteMap, MetaX, modxtalks, phpThumbOf, Quip, SimpleSearch, taglister, TinyMCE, translit
  • Error Log Contents: nothing.

Form:

[[!SimpleSearchForm? &method=`GET` &landing=`[[++searchlid]]` &tpl=`lisearch` &searchIndex=`query`]]

searchlid - different for each context.

lisearch:

<form class="search" action="[[~[[+landing:default=`[[*id]]`]]]]" method="[[+method:default=`get`]]">
       <input type="text" placeholder="[[%babel.placeholder_[[++cultureKey]]]]" name="[[+searchIndex]]" id="[[+searchIndex]]"/>
                            <input type="submit" id="search_btn" value=""/>
                            <input type="hidden" name="id" value="[[+landing:default=[[*id]]]]" />
</form>

mysql> show variables like 'char%';

+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.03 sec)

mysql> show variables like 'collation%';

+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database   | utf8_unicode_ci |
| collation_server     | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

In template:

<meta charset="utf-8"/>
<meta http-equiv="content-language" content="ru" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

What could be the problem?

Thank you in advance.


Solution

  • Surprisingly, the problem was resolved removal from the snippet parameters. I do not know what it is connected.

    A working version:

    [[!SimpleSearchForm? &landing=`[[++searchlid]]` &tpl=`lisearch`]]
    

    and just

    [[!SimpleSearch]]
    

    on landind page.