We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23591
    • 4 Posts
    Just had a problem when upgrading, and fixed it, so I thought I’d just mention it here in case I can save someone some time.

    After the upgrade I received a message at the top of the page where the Search box should be. It went something like this, although I don’t have the exact message any more as I was forced to clear my cache

    AjaxSearch: Unknown database_connection_charset utf-8
    Change the mapping in search.class.inc.php

    I looked in my config.inc.php file and saw that the database_connection_charset was set as specified, and I checked that the database was also expecting that characterset.

    I then found the file here.
    /assets/snippets/ajaxSearch/classes/search.class.inc.php

    And about 14 lines down I found this.
      // Conversion code name between html page character encoding and Mysql character encoding
      // Some others conversions should be added if needed. Otherwise Page charset = Database charset
      var $pageCharset = array(
        'utf8' => 'UTF-8',
        'latin1' => 'ISO-8859-1',
        'latin2' => 'ISO-8859-2'


    I changed the first line to
    'utf-8' => 'UTF-8',


    And reloaded the page. I got a message to delete my browser cache, and after that it was OK.

    So ... I’m not sure if there was an error in the upgraded search.class.inc.php file, or not, but this fixed it.

      • 5811
      • 1,717 Posts
      AjaxSearch: Unknown database_connection_charset utf-8
      Change the mapping in search.class.inc.php
      Means that your manager/includes/config.inc.php file is initialised with utf-8 as database connection charset. Which is a wrong connection charset for mysql. The correct connection charset should be utf8 (without underscore!).
      Changing the message in the search.inc.php file, remove the caution message but don’t solve your initial issue.

      The correct version of the pageCharset is:
      var $pageCharset = array(
      ’utf8’ => ’UTF-8’,
      ’latin1’ => ’ISO-8859-1’,
      ’latin2’ => ’ISO-8859-2’