Problema na migração OJS 2.4.8.0 para 3.1.1.2

Prezados, bom dia.

Estamos tentando atualizar a versão do OJS 2.4.8.0 para 3.1.1.2 e houve erro de migração.

  • O Banco de Dados já está na versão 3;
  • Foi executada a migração (upgrade.php upgrade) e finalizou com alguns WARNING’S e não subiu a versão.

Status atual:

Code version: 3.1.1.2
Database version: 2.4.8.0
Latest version: 3.1.1.2

Alguma sugestão?

Desde já agradeço.

Olá
Recomendo que repita todo o processo, mas de forma a garantir os 100% de sucesso penso que deveria seguir as recomendações do pessoal da pkp, 5 Steps to OJS 3: Upgrade Planning for Service Providers

1 curtida

Olá @andreluizdetoledo

Pela mensagem de status o seu banco de dados não foi atualizado, mas somente o seu código é o mais recente.
Restaure o backup do banco de dados e do files_dir (tenha sempre os originais antes de qualquer tentativa de upgrade) e rode novamente o comando de upgrade.

Abraços
Israel

Prezado Israel, boa tarde.

Foi feito exatamente isso, restauramos tudo (dentro de um sand box) refeito hoje para confirmar e aparentemente, não houve erro no log. O problema ainda persiste.
Segue esse log de migração do banco como referência:

[15:49:05 - Qui Ago 02] /home/revista/teste2/ojs
[root@bibnovo]# php tools/upgrade.php check
Code version: 3.1.1.2
Database version: 2.4.8.0
Latest version: 3.1.1.2
Database version is older than code version
Run “tools/upgrade.php upgrade” to update

[15:49:07 - Qui Ago 02] /home/revista/teste2/ojs
[root@bibnovo]# php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.1.1.2]

[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]
WARNING: Unable to find a match for “2-7-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2/”. Skipping this file.
WARNING: Unable to find a match for “33-107-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/33/”. Skipping this file.
WARNING: Unable to find a match for “33-107-2-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/33/”. Skipping this file.
WARNING: Unable to find a match for “57-179-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/57/”. Skipping this file.
WARNING: Unable to find a match for “88-428-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/88/”. Skipping this file.
WARNING: Unable to find a match for “89-447-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/89/”. Skipping this file.
WARNING: Unable to find a match for “142-794-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/142/”. Skipping this file.
WARNING: Unable to find a match for “140-790-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/140/”. Skipping this file.
WARNING: Unable to find a match for “143-797-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/143/”. Skipping this file.
WARNING: Unable to find a match for “145-799-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/145/”. Skipping this file.
WARNING: Unable to find a match for “146-801-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/146/”. Skipping this file.
WARNING: Unable to find a match for “149-803-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/149/”. Skipping this file.
WARNING: Unable to find a match for “150-805-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/150/”. Skipping this file.
WARNING: Unable to find a match for “153-814-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/153/”. Skipping this file.
WARNING: Unable to find a match for “163-891-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/163/”. Skipping this file.
WARNING: Unable to find a match for “170-927-1-RV.pdf” in “/home/revista/teste2/ojs/files/journals/1//articles/170/”. Skipping this file.
WARNING: Unable to find a match for “190-986-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/190/”. Skipping this file.
WARNING: Unable to find a match for “218-1255-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/218/”. Skipping this file.
WARNING: Unable to find a match for “230-1323-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/230/”. Skipping this file.
WARNING: Unable to find a match for “275-1621-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/275/”. Skipping this file.
WARNING: Unable to find a match for “260-1524-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/260/”. Skipping this file.
WARNING: Unable to find a match for “304-1842-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/304/”. Skipping this file.
WARNING: Unable to find a match for “305-1845-1-RV.pdf” in “/home/revista/teste2/ojs/files/journals/1//articles/305/”. Skipping this file.
WARNING: Unable to find a match for “339-2085-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/339/”. Skipping this file.
WARNING: Unable to find a match for “340-2087-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/340/”. Skipping this file.
WARNING: Unable to find a match for “341-2089-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/341/”. Skipping this file.
WARNING: Unable to find a match for “352-2164-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/352/”. Skipping this file.
WARNING: Unable to find a match for “362-2194-1-RV.rtf” in “/home/revista/teste2/ojs/files/journals/1//articles/362/”. Skipping this file.
WARNING: Unable to find a match for “443-2740-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/443/”. Skipping this file.
WARNING: Unable to find a match for “803-3718-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/803/”. Skipping this file.
WARNING: Unable to find a match for “872-3283-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/872/”. Skipping this file.
WARNING: Unable to find a match for “887-3310-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/887/”. Skipping this file.
WARNING: Unable to find a match for “979-3443-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/979/”. Skipping this file.
WARNING: Unable to find a match for “1023-3591-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/1023/”. Skipping this file.
WARNING: Unable to find a match for “1235-3887-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/1235/”. Skipping this file.
WARNING: Unable to find a match for “1564-4476-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/1564/”. Skipping this file.
WARNING: Unable to find a match for “2005-7663-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2005/”. Skipping this file.
WARNING: Unable to find a match for “2064-8027-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/2064/”. Skipping this file.
WARNING: Unable to find a match for “2066-8028-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2066/”. Skipping this file.
[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::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]
WARNING: Unable to find a match for “2038-7869-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2038/”. Skipping this file.
WARNING: Unable to find a match for “2042-7875-1-RV.doc” in “/home/revista/teste2/ojs/files/journals/1//articles/2042/”. Skipping this file.
WARNING: Unable to find a match for “2043-7878-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2043/”. Skipping this file.
WARNING: Unable to find a match for “2045-7880-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2045/”. Skipping this file.
WARNING: Unable to find a match for “2068-8036-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2068/”. Skipping this file.
WARNING: Unable to find a match for “2069-8041-1-RV.docx” in “/home/revista/teste2/ojs/files/journals/1//articles/2069/”. Skipping this file.

[code: Installer Installer::convertSupplementaryFiles]

[code: Installer Installer::provideSupplementaryFilesForReview]
PHP Warning: assert(): Assertion failed in /home/revista/teste2/ojs-3.1.1-2/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 285

Invalid file!

ojs2: Invalid file!

[16:06:22 - Qui Ago 02] /home/revista/teste2/ojs
[root@bibnovo]# php tools/upgrade.php check
Code version: 3.1.1.2
Database version: 2.4.8.0
Latest version: 3.1.1.2
Database version is older than code version
Run “tools/upgrade.php upgrade” to update

Olá @andreluizdetoledo

Você está enfrentando a mesma situação que outro usuário reportou em uma Issue do Github do projeto.

Por favor, olhe: no migration of active supp files with file_id=0 · Issue #3783 · pkp/pkp-lib · GitHub

Especificamente é este o patch(ou podes ajustar manualmente o código se preferires):

Verás que é necessário aplicar um patch antes de rodar o upgrade. Isso acontece porque na versão 2.4.x era possível criar arquivos suplementares sem necessariamente subir um arquivo.

Esse patch também está configurado para ser incluído no release 3.1.1-4 do OJS.

Abraço,
Israel