OJS Upgrade 2.4.5 > 3.1.1, DB-Error "Duplicate entry 'doipubidplugin-0-enabled' for key 'plugin_settings_pkey'"

Hi,

we have to move our OJS (2.4.5) to a new server. This server does not support php5 anymore. Thought it would be best to upgrade to the newest version.

Server stats:

  • php: 7.0.28-0ubuntu0.16.04.1
  • Apache: 2.4.18 (Ubuntu)
  • Database: 10.0.34-MariaDB-0ubuntu0.16.04.1
  • OS: Ubuntu 16.04 (kernel 4.4.0-116-generic)

Upgrade steps:

  • Downloaded ojs-3.1.1.tar.gz
  • extracted into an empty folder
  • copied file directory to new server
  • copied public directory to new server
  • merged changes to config.inc.php
  • dumped database and imported to new server
  • running html installation

Getting the following error:
A database error has occurred: Duplicate entry ‘doipubidplugin-0-enabled’ for key ‘plugin_settings_pkey’

The database is imported from the running 2.4.5 instance. It is not partly upgraded. It was deleted and reimported several times. With the same result.
The table “plugin_settings” had a key named “plugin_settings_pkey”. However there is no column named “doipubidplugin-0-enabled” in the entire database.

Manually adjusting config.inc.php gives the error:
DB Error: Table ‘DB_NAME.navigation_menu_items’ doesn’t exist

I’d be very happy if you could help me with that. Did I miss an important step? I wouldn’t mind adjusting the database manually but i don’t know where to start.

Kind regards

Hi @bbb

Hmmm… Maybe to first try to migrate the whole current OJS 2.4.5 installation and to be sure everything is set correctly on the new server and running as usually.
Then, actually your steps were correct, except maybe one: “running html installation”. You should not run the installation but the upgrade. More information about the upgrade u can find in the readme.

Let me know what you get then…

Best,
Bozana

Hello Bozana,

thanks a lot your reply. I didn’t mention it, but I did try to migrate the current OJS 2.4.5 installation. I think it is impossible to set it up with php7. It gave 2 deprecation warnings and a fatal error.

Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in /home/ojs/httpdocs/site/lib/pkp/classes/core/PKPApplication.inc.php on line 545

Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in /home/ojs/httpdocs/site/lib/pkp/classes/core/PKPApplication.inc.php on line 513

Fatal error: Cannot use ‘String’ as class name as it is reserved in /home/ojs/httpdocs/site/lib/pkp/classes/core/String.inc.php on line 57


I don’t know why I was assuming that the installer would automatically call the upgrade script.

Script ran for half an hour but it was worth waiting. OJS seems to work fine now. Just my design adjustments are broken but that’s a small prize to pay.

Thank you very much for your help.

Kind regards