Search is broken in OJS

There was a problem searching authors with a hyphen that brought no results.

I ran php tools/resbuildSearchIndex.php and it failed with the following Exception

PHP Fatal error: Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘\xF0\x9D\x91\x81\xF0\x9D…’ for column submission_search_keyword_list.keyword_text at row in lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:119

Now Search is completely broken.

My system is as below

|OS platform|Linux| Ubuntu 22.04 LTS
|PHP version|7.4.33|
|Apache version|Apache/2.4.52 (Ubuntu)|
|Database driver|mysql|
|Database server version|5.5.5-10.6.16-MariaDB-0ubuntu0.22.04.1|

Has anyone got any idea how I can fix this issue?


Hi Nason,

See if the solutions presented in the links below work for you?

Thank you @abadan, I will give it a go and will update the thread.


Hi @abadan

I tried option 1 and it did not solve the problem. I instead took a leaf from Fatal error Invalid datetime format when rebuilding search index - #9 by lcmartinezru and added a try-catch to ignore the problem records for now which is not ideal.

Going forward and for future-proofing, I will look into option 2, however, before doing that, I would like to know if future OJS versions including 3.4.x which we will still work with a database still using utf8mb3.