Openjournaltheme Tips & Trick
In an OJS installation or OJS upgrade that uses multiple languages, there will be the possibility of errors due to different collation sets used between columns. This will happen when you access the detail article page, so you will find the following error:
Fatal error: Uncaught Exception: DB Error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’ Query: SELECT o.submission_id, MAX(s.context_id) AS journal_id, MAX(i.date_published) AS i_pub, MAX(p.date_published) AS s_pub, COUNT(*) AS count FROM submissions s JOIN publications p ON (p.publication_id = s.current_publication_id) JOIN publication_settings ps ON (ps.publication_id = p.publication_id AND ps.setting_name=’issueId’) JOIN issues i ON (CAST(i.issue_id AS CHAR) = ps.setting_value) JOIN submission_search_objects o ON (s.submission_id = o.submission_id) NATURAL JOIN submission_search_object_keywords o0 NATURAL JOIN submission_search_keyword_list k0 WHERE s.status = 3 AND i.published = 1 AND k0.keyword_text = ? AND i.journal_id = ? GROUP BY o.submission_id ORDER BY count DESC LIMIT 500 in /home/journal/public_html/jupa/lib/pkp/classes/db/DAO.inc.php:703 Stack trace: #0 /home/journal/public_html/jupa/lib in /home/journal/public_html/jupa/lib/pkp/classes/db/DAO.inc.php on line 703
Here are the steps for performing this fix :
1. Enable display error in OJS.
2. Find all related table :
For example, with this error you should understand that there are several tables associated with this error :
- publications
- publication_settings
- submission_search_objects
- submission_search_object_keywords
- submission_search_keyword_list
Edit each table and column Unicode / collation
Furthermore, if you encounter problems, please write them in the comments