DB Duplicate entry error when upgrading from OJS 2.4.8 to 3.2.1

We are upgrading a number of OJS installations from 2.4.8 to 3.2.1 (the newer versions are running on a separate server). Most upgrades are successful, but there is one that fails with a duplicate entry error. This happens on a fresh install running against a new copy of the database.
The exact error is:
ERROR: Upgrade failed: DB: Duplicate entry ‘0-en_US-subject’ for key ‘email_settings_pkey’
From poking around the install/upgrade scripts it seems as if this may be related to a problem with the email_templates_data table, but I can’t find any entries in that table that might account for a duplicate entry error. There are a number of entries which share the same locale and subject, but they are for different journals (i.e. different assoc_id).
Any suggestions on where to look further would be appreciated.
Thanks !

Hi @elt,

I’m not sure if you’ve encountered this post, but it might be worth a try.

Alec Smecher
Public Knowledge Project Team

Many thanks Alec!
I hadn’t seen that post. After running the suggested sql statement the upgrade was successful.

I did notice a very large number of PHP warnings:
PHP Warning: Illegal string offset ‘en_US’ in /mypath/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot assign an empty string to a string offset in /mypath/lib/pkp/classes/core/DataObject.inc.php on line 133

should I be concerned?

Thanks again.

Hi @elt,


Those warnings are harmless, but you can resolve them to clean up your logs – they relate to data that’s slightly out of spec. See e.g. Errors like "Illegal string offset" and locales.

Alec Smecher
Public Knowledge Project Team

Perfect. Thanks again !