Problems with upgrade from 2.4.8.4 to 3.1.2.0

Hi,

We have problems with upgrading version 2.4.8.4 to 3.1.2.0. I’m posting the process and it always stops at the last line. Do you have any idea how to overcome this issue?

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

[code: Installer Installer::checkPhpVersion]

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

[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]
[data: dbscripts/xml/upgrade/3.1.2_preupdate_user_author_names.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/categories.xml]
[schema: lib/pkp/xml/schema/notes.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::migrateSRLocale]

[code: Installer Installer::migrateUserAndAuthorNames]

[code: Installer Installer::concatenateIntoAbout]

[code: Installer Installer::concatenateIntoMasthead]
[code: Installer Installer::migrateCounterPluginUsageStatistics (skip
[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipp
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml (skip
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipp
[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]

[code: Installer Installer::provideSupplementaryFilesForReview]

We thought it had something to do with permissions but every user has the full access to the code and files.

are you seeing an error in php error log when it stops? Try enabling errors in config.inc.php and see what the error is when the upgrade dies.

Thank you for responding. I’m sending the php error log.

[25-Mar-2019 16:45:01 Europe/Belgrade] PHP Fatal error: Uncaught Error: Call to a member function getFileId() on null in C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\file\SubmissionFileManager.inc.php:184
Stack trace:
#0 C:\inetpub\wwwroot\aseestant.ceon.rs\classes\install\Upgrade.inc.php(1476): SubmissionFileManager->copyFileToFileStage(‘68754’, 1, 4, NULL, true)
#1 C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\install\Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array)
#2 C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\install\Installer.inc.php(265): Installer->executeAction(Array)
#3 C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\install\Installer.inc.php(186): Installer->executeInstaller()
#4 C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\cliTool\UpgradeTool.inc.php(88): Installer->execute()
#5 C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\cliTool\UpgradeTool.inc.php(64): UpgradeTool->upgrade()
#6 C:\inetpub\wwwroot\aseestant.ceon.rs\tools\upgrade.php(34): UpgradeTool->execute()
#7 in C:\inetpub\wwwroot\aseestant.ceon.rs\lib\pkp\classes\file\SubmissionFileManager.inc.php on line 184

It seems similar to post no migration of active supp files with file_id=0 · Issue #3783 · pkp/pkp-lib · GitHub, but I thought that it was included in the upgrades with 3.1.1 stable.

Update:

I’ve tried without supplementary files where file id was 0, but it didn’t work again.

I have a feeling that this change from May (that was implemented in 3.1.2) is causing this: pkp/pkp-lib#3741 do not copy file in the files folder before DB insert · pkp/pkp-lib@0365318 · GitHub

I can see other threads here with a similar issue an error. Not sure yet what is causing it.

Does the file with file_id 68754 actually exist in your file system?

It seems that we lost some files, so as 68754, during moving to the another server. I removed 68754 from DB and now it stopped on another ID. Since those files are not of major importance for us, do you have any suggestions how to overcome this with code change, for example, if there is no file in file system skip, but not with the fatal error?

We are unable to recover missing files, so that cannot be an option.

Thanks.

It was a problem with missing files during server change. After I deleted supplementary from dates we were moving to another server from DB, the upgrade went well.

Thank you @ajnyga for your help.

Hello Nikolas, I have the same problem. Could you help me by telling me what exactly you did? Following is the log below:

Fatal error: Uncaught Error: Call to a member function getFileId() on null in /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/file/SubmissionFileManager.inc.php:184
Stack trace:
#0 /home/webuser/revistas/ojs-3.1.2-1/classes/install/Upgrade.inc.php(1473): SubmissionFileManager->copyFileToFileStage(‘76883’, 1, 4, NULL, true)
#1 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array)
#2 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array)
#3 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller()
#4 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/cliTool/UpgradeTool.inc.php(88): Installer->execute()
#5 /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/cliTool/UpgradeTool.inc.php(64): UpgradeTool->upgrade()
#6 /home/webuser/revistas/ojs-3.1.2-1/tools/upgrade.php(34): UpgradeTool->execute()
#7 {main}
thrown in /home/webuser/revistas/ojs-3.1.2-1/lib/pkp/classes/file/SubmissionFileManager.inc.php on line 184