Upgrade error from OJS to OJS

Hello everyone,
I’m trying to upgrade an OJS to OJS , but I’m encountering particular errors that I’ve never seen before. The two errors shown by the upgrade procedure are:

[load: upgrade.xml]
[code: Installer Installer::checkPhpVersion]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_review_assignments.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_notes.xml (skipped)]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_payments.xml]
[data: dbscripts/xml/upgrade/3.1.1_preupdate_citations.xml]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_user_author_names.xml]
[code: Installer Installer::migrateSubmissionCoverImages]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_email_templates.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning_articleGalleySettings.xml]
ERROR: Upgrade failed: DB: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'submission_galley_settings' already exists (SQL: CREATE TABLE submission_galley_settings AS SELECT * FROM article_galley_settings WHERE setting_name <> 'excludeDoi' AND setting_name <> 'excludeURN')

and, if I manually create that table:

[code: Installer Installer::moveCSSFiles]
[code: Installer Installer::moveReviewerFiles]
[code: Installer Installer::fixAuthorGroup]
[data: dbscripts/xml/upgrade/3.0.0_reviewer_files.xml]
[code: Installer Installer::removeCancelledReviewAssignments]
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'rr.submission_file_id' in 'on clause' in /lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78
Stack trace:
#0 /lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(78): PDO->prepare('select `sf`.*, ...', Array)
#1 /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(361): Doctrine\DBAL\Driver\PDOConnection->prepare(Object(Illuminate\Database\Query\Expression))
#2 /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Co in /lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671

There is some mess with the database here? Do you have any ideas on how to resolve this?

Since I was unable to upgrade, I’ve also tryed to export the articles and issues with the CLI export command:

php7.3 importExport.php NativeImportExportPlugin export output.xml <journal-path> issue <ojs-issue-id>

and import it to a fresh OJS installation, but, the procedure exits almost instantly without any message or error. Always with the CLI command:

php7.3 importExport.php NativeImportExportPlugin import output.xml <journal-path> <user>

Are the XML formats of the two versions not compatible?

Thank you very much for any suggestion!

Your update steps should be:
First step: Update from to
Second step: Update from to 3.2.1-4.
Third step: Update from 3.2.1-4 to

Note: Never forget to backup the current site!

1 Like

Thanks for the advice! In this way, it worked.

1 Like

Hi all,

There’s a relevant issue filed in Github: upgrade to 3.3 from 3.0.2 fails because submission_galley_settings table already exists · Issue #7642 · pkp/pkp-lib · GitHub

Alec Smecher
Public Knowledge Project Team