Upgrade 2.4.8 to 3.1.1.-4

Dear Alec,

We are getting the same error that we got in 3.1.1.1 & 3.1.1-2. Upgrade stopped after “[code: Installer Installer::provideSupplementaryFilesForReview]”

Stack trace: #0
/home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php(315): PKPSubmissionFileDAO->_castToDatabase(NULL) #1
/home1/jott/public_html/lib/pkp/classes/file/SubmissionFileManager.inc.php(185): PKPSubmissionFileDAO->insertObject(Object(SupplementaryFile), ‘/home1/jott/fil…’) #2
/home1/jott/public_html/classes/install/Upgrade.inc.php(1491): SubmissionFileManager->copyFileToFileStage(‘3409’, 1, 4, NULL, true) #3
/home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array) #4
/home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array) #5
/home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller() #6
/home1/jott/public_html/lib/pkp/classes/cliTool/UpgradeTool.inc.php in
/home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065

from error_log
[14-Sep-2018 06:11:17 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getFileId() on null in /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:1065 Stack trace: #0 /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php(315): PKPSubmissionFileDAO->_castToDatabase(NULL) #1 /home1/jott/public_html/lib/pkp/classes/file/SubmissionFileManager.inc.php(185): PKPSubmissionFileDAO->insertObject(Object(SupplementaryFile), ‘/home1/jott/fil…’) #2 /home1/jott/public_html/classes/install/Upgrade.inc.php(1491): SubmissionFileManager->copyFileToFileStage(‘3409’, 1, 4, NULL, true) #3 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array) #4 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array) #5 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller() #6 /home1/jott/public_html/lib/pkp/classes/cliTool/UpgradeTool.inc.php in /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065

from command line
jott@threatenedtaxa.org [~/public_html]# php tools/upgrade.php upgrade

[pre-install]

[load: upgrade.xml]

[version: 3.1.1.4]

[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::migrateSRLocale]

[code: Installer Installer::migrateNOLocale]

[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]

ERROR: Upgrade failed: DB: Lost connection to MySQL server during query

jott@threatenedtaxa.org [~/public_html]# php tools/upgrade.php upgrade

[pre-install]

[load: upgrade.xml]

[version: 3.1.1.4]

[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::migrateSRLocale]

[code: Installer Installer::migrateNOLocale]

[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]

[code: Installer Installer::provideSupplementaryFilesForReview]

Are you sure everything was OK with your DB durign upgrade? From following error I would say that the connection to the DB has been lost:

After that I tried upgrading two times but getting the error
7-Sep-2018 06:12:41 America/Chicago] PHP Warning: copy(/home1/jott/files-ojs/journals/1//articles/1709/submission/proof/1709-12-3409-1-10-20141222.docx): failed to open stream: No such file or directory in /home1/jott/public_html/lib/pkp/classes/file/FileManager.inc.php on line 159 [17-Sep-2018 06:12:41 America/Chicago] PHP Warning: copy(/home1/jott/files-ojs/journals/1//articles/1709/submission/review/1709-12–1-4-20141222.docx): failed to open stream: No such file or directory in /home1/jott/public_html/lib/pkp/classes/file/FileManager.inc.php on line 159 [17-Sep-2018 06:12:41 America/Chicago] PHP Fatal error: Uncaught Error: Call to a member function getFileId() on null in /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:1065 Stack trace: #0 /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php(315): PKPSubmissionFileDAO->_castToDatabase(NULL) #1 /home1/jott/public_html/lib/pkp/classes/file/SubmissionFileManager.inc.php(185): PKPSubmissionFileDAO->insertObject(Object(SupplementaryFile), ‘/home1/jott/fil…’) #2 /home1/jott/public_html/classes/install/Upgrade.inc.php(1491): SubmissionFileManager->copyFileToFileStage(‘3409’, 1, 4, NULL, true) #3 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(421): Upgrade->provideSupplementaryFilesForReview(Object(Upgrade), Array) #4 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(265): Installer->executeAction(Array) #5 /home1/jott/public_html/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller() #6 /home1/jott/public_html/lib/pkp/classes/cliTool/UpgradeTool.inc.php in /home1/jott/public_html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1065

Can you verify the permissions to the files and directories under /home1/jott/files-ojs ?

I have given 755 permission.

One thing is, we have deleted submission and review files of old files when it’s published as our file storage became very heavy.

Do I have to delete any records from the database?

Regards

Latha

Hi @latha_ojs,

Uf that is quite a challenge. Yes there are records in the DB as well. How to delete them, I have no idea.

Regards, Primož