OJS SEARCH stopped working after update

Description of issue or problem I’m having:

The search option stopped working after update

Steps I took leading up to the issue:
What I tried to resolve the issue:

We created a backup of the database and tried to change the collation from utf8_general_ci to utf8_unicode_ci, but it didn’t work, and we tried to change MyISAM to InnoDB and it didn’t work either.

Application Version - e.g., OJS

Additional information, such as screenshots and error log messages if applicable:
Fatal error : Uncaught PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’ in /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78 Stack trace: #0 /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(78): PDO->prepare(‘SELECT\n\t\t\t\to.su…’, Array) #1 /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(361): Doctrine\DBAL\Driver\PDOConnection->prepare(Object(Illuminate\Database\Query\Expression)) #2 /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array) #3 /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Co in /home1/fajee520/public_html/periodicos/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671

Hi @Rafael_Patrick_de_So,

did you check the [database] collation setting at config.inc.php?

Besides that, if you search “Illegal mix of collations” on the forum you’ll find multiple topics about this issue. Here you have a few, even related to “search” functionality:


First of all thanks for answer me, in config.inc.php the Database collation is set: utf8_general_ci

; Database collation
collation = utf8_general_ci

; Default locale
locale = pt_BR

; Client output/input character set
client_charset = utf-8

; Database connection character set
connection_charset = utf8

Now I’m reading the topics that you recommending me, thanks again, I will back here to say if a did resolve or not.

It worked, thanks for the help! we changed the entire database to utf8_general_ci and the system started working again!

Good to know! And thank you for reporting back. Will be useful for others!

1 Like