Failed to upgrade from 2.4.8 to 3.1.1

Failed to upgrade via shell command line. With show_stacktrace turned on in config.inc.php, I got following error message. Same error when upgrading to 3.1.0.1 I have no idea how to debug from here. Any help will be greatly appreciated.

Paul

[pre-install]
[load: upgrade.xml]
[version: 3.1.1.0]

[code: Installer Installer::checkPhpVersion]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml (skipped)]

[code: Installer Installer::removeReviewEntries]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_preupdate_commentsToEditor.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_review_assignments.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_notes.xml]
[data: dbscripts/xml/upgrade/3.1.0_preupdate_payments.xml]
[data: dbscripts/xml/upgrade/3.1.1_preupdate_citations.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: lib/pkp/xml/schema/navigationMenus.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]

[code: Installer Installer::installDefaultNavigationMenus]

[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]

[code: Installer Installer::concatenateIntoAbout]

[code: Installer Installer::concatenateIntoMasthead]

[code: Installer Installer::migrateCounterPluginUsageStatistics (skipped)]

[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped)]

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::installDefaultGenres]

[code: Installer Installer::migrateArticleMetadata]
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/3.0.0_scheduledTasks.xml]

[code: Installer Installer::localizeCustomBlockSettings]

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]

[code: Installer Installer::convertSupplementaryFiles]

Unknown locale component

Stack Trace:

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/submission/SubmissionFile.inc.php line 593
Function: PKPLocale::requireComponents(1, Null)

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php line 94
Function: SubmissionFile->_generateName()

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/submission/SupplementaryFileDAODelegate.inc.php line 36
Function: SubmissionFileDAODelegate->insertObject(Object(SupplementaryFile), "/home2/abepubli/files2/journals/2//articles/1/submission/proof/1...", False)

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php line 384
Function: SupplementaryFileDAODelegate->insertObject(Object(SupplementaryFile), "/home2/abepubli/files2/journals/2//articles/1/submission/proof/1...")

File: /home2/abepubli/public_html/ojs311/classes/install/Upgrade.inc.php line 1370
Function: PKPSubmissionFileDAO->updateObject(Object(SubmissionFile))

File: (unknown) line (unknown)
Function: Upgrade->convertSupplementaryFiles(Object(Upgrade), Array(1))

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/install/Installer.inc.php line 421
Function: call_user_func(Array(2), Object(Upgrade), Array(1))

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/install/Installer.inc.php line 265
Function: Installer->executeAction(Array(3))

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/install/Installer.inc.php line 186
Function: Installer->executeInstaller()

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 88
Function: Installer->execute()

File: /home2/abepubli/public_html/ojs311/lib/pkp/classes/cliTool/UpgradeTool.inc.php line 64
Function: UpgradeTool->upgrade()

File: /home2/abepubli/public_html/ojs311/tools/upgrade.php line 34
Function: UpgradeTool->execute()

Hi @Paul_Chen

Hmmm… It seems like one your submission has a locale that does not exist in OJS 3.1 (yet). What languages do you have/are you using for submissions?

Best,
Bozana

Hi @bozana ,

I am using English.

Paul

Hmmm… Does the locale exist for all your articles – the locale column in the DB table articles? – or is it maybe sometimes NULL?

@bozana,

Should I check the 2.3.3 DB tables? So this has nothing to do with the locale files of the OJS program, am I correct? Thanks!

Paul

Yes, please check the 2.3.3 DB table articles – the values in the column locale there. Maybe with an SQL statement something like: select * from articles where locale = NULL or locale = ‘’.
The file names are generated based on the submission locale, using a locale key, from the locale files. If you are using English, the locale files are for sure there, so this seems not to be the problem…

Hi @bozana,

I checked. All entries for locale are NULL. What should I do with this? Thank you.

Paul

Hmm… I do not know how this happened… Hmmm… :thinking:
If you are using just one locale i.e. if your all articles are in one language it will be easy to manually insert that locale. For example, if all your articles are in English, you could use something like:
UPDATE articles SET locale = ‘en_US’ WHERE locale = NULL.
So do not forget to make backup before doing anything!
Then you could make the change, do another DB backup again and try to upgrade again…

1 Like

I am going to try that. Thanks a lot.

Hi @bozana ,

I ran the script and fixed that problem. After fixing a few more DB errors, I was able to upgrade to 3.1.

The frontend seems working. A couple issues:

  1. Logged in as admin, clicking dashboard would take me to submissions page with this error:
    This page isn’t working
    abepublishing.org is currently unable to handle this request.
    HTTP ERROR 500

The same error appears when clicking Submission within the control panel. This also occurs to fresh installation as I reported earlier. Is this related to PHP version?

  1. On the home page, There are unnecessarily large white space between sections on the Current issue listing.

Thank you.

Paul

I played a little with PHP configuration and found a way to make the 500 error go away. It is a little complicated for my situation. I am running production on 2.3.3 which doesn’t work with PHP 5.6 but my 2.4.8 and 3 require PHP 5.6. I tried different combinations of .htaccess and php.ini in different folders and found a good mix that works for all versions.

Phew… Yes, a little bit complicated situation… :-\

So the upgrade did not have any further warnings? – This is very important!

Best,
Bozana