We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    Getting a strange error if users try inputting any characters which are Russian / Polish (haven’t tried other character sets yet) into their search using AjaxSearch on our site:

    MODx encountered the following error while attempting to parse the requested resource: 
    « Execution of a query to the database failed - Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like' » 
          SQL: SELECT sc.id, sc.pagetitle, sc.longtitle, sc.description, sc.alias, sc.introtext, sc.menutitle, sc.content, sc.publishedon, GROUP_CONCAT( DISTINCT CAST(ntv.id AS CHAR) SEPARATOR "," ) AS tv_id, GROUP_CONCAT( DISTINCT ntv.value SEPARATOR ", " ) AS tv_value FROM `expotel_site_content` sc LEFT JOIN( SELECT DISTINCT tv.id, tv.value, tv.contentid FROM `expotel_site_tmplvar_contentvalues` tv WHERE (((tv.value LIKE '%łdfdfłłgh%'))) ) AS ntv ON sc.id = ntv.contentid WHERE ((sc.published=1) AND (sc.searchable=1) AND (sc.deleted=0) AND (sc.type='document') AND (sc.privateweb=0)) GROUP BY sc.id HAVING (((sc.pagetitle LIKE '%łdfdfłłgh%') OR (sc.longtitle LIKE '%łdfdfłłgh%') OR (sc.description LIKE '%łdfdfłłgh%') OR (sc.alias LIKE '%łdfdfłłgh%') OR (sc.introtext LIKE '%łdfdfłłgh%') OR (sc.menutitle LIKE '%łdfdfłłgh%') OR (sc.content LIKE '%łdfdfłłgh%') OR (tv_value LIKE '%łdfdfłłgh%'))) ORDER BY sc.publishedon,sc.pagetitle  
    


    Any ideas what might be causing this? And how to fix?
      • 5811
      • 1,717 Posts
      Under PhpMyAdmin could you export the structure of the following tables:
      - expotel_site_content
      - expotel_site_tmplvar_contentvalues

      and check that all the "text" fields have the save collations (utf8_general_ci or latin1_swedish)
        • 10405
        • 288 Posts
        Problem is we don’t have phpMyadmin installed on the server.

        I’ve been able to check the current collation on all the site db’s however, and these are all set to latin1_swedish.

        Not sure how we’d safely change the collation if that’s what needs doing.