[OJS 3.2.0.2] Error adding files to a submission galley

Greetings,

I recently updated to OJS version 3.2.2.0, an installation with MySQL setup. I tried to configure an article, and found an error when adding a file to a submission galley.

My PHP logs show

PHP Fatal error: Uncaught Exception: DB Error: Duplicate entry ‘59423-1187’ for key ‘submission_search_object_keywords_pkey’ Query: INSERT INTO submission_search_object_keywords (object_id, keyword_id, pos) VALUES (?, ?, ?)

Summary

in C:\xampp\htdocs\ojs-3.2.0-2\lib\pkp\classes\db\DAO.inc.php:703\nStack trace:\n#0 C:\xampp\htdocs\ojs-3.2.0-2\lib\pkp\classes\db\DAO.inc.php(231): DAO->handleError(Object(ADODB_mysqli), ‘INSERT INTO sub…’)\n#1 C:\xampp\htdocs\ojs-3.2.0-2\lib\pkp\classes\search\SubmissionSearchDAO.inc.php(125): DAO->update(‘INSERT INTO sub…’, Array)\n#2 C:\xampp\htdocs\ojs-3.2.0-2\classes\search\ArticleSearchIndex.inc.php(309): SubmissionSearchDAO->insertObjectKeyword(‘59423’, ‘belonging’, 1187)\n#3 C:\xampp\htdocs\ojs-3.2.0-2\classes\search\ArticleSearchIndex.inc.php(113): ArticleSearchIndex->_indexObjectKeywords(‘59423’, ’ Uni…’, 1187)\n#4 C:\xampp\htdocs\ojs-3.2.0-2\classes\search\ArticleSearchIndex.inc.php(156): ArticleSearchIndex->submissionFileChanged(9461, 128, 29368)\n#5 C:\xampp\htdocs\ojs-3.2.0-2\lib\p in C:\xampp\htdocs\ojs-3.2.0-2\lib\pkp\classes\db\DAO.inc.php on line 703, referer:http://localhost/ojs-3.2.0-2/index.php/pruebas/workflow/index/9461/1

Hi @jpcv222,

You can re-generate your search index by running:

php tools/rebuildSearchIndex.php

I suspect this will fix the immediate problem. But be cautious that you haven’t accidentally changed your character set configuration during the upgrade; are you having troubles with special (accented) characters? Is your config.inc.php character set configuration in the new installation the same as pre-upgrade? Is your database’s default character set UTF-8?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

My default character set configuration was Latin 1. I modified manually the character set and collation (utf8 and utf8_general_ci respectively) from my database and some tables. At the moment there are no problems.

Thank you a lot!

1 Like