I upgraded OJS 3.1.2-1 to 3.2.1-4 after some errors. If I did a well done, it can help others.
I managed to get around them, it worked, but I’m not sure I’m right, because after that I could’n upgrade from 3.2.1-4 to 3.3.0-8 version.
Also I could’n upgrade directly from 3.1.2-1 to 3.3.0-8.
First, if you can help me, I’d to know if I did a well work upgrading to 3.2.1-4.
ps: After this topic, I pretend open a new Topic about my upgrading from 3.2.1-4 to 3.3.0-8.
1º ERROR MESSAGE:
$ php tools/upgrade.php upgrade PHP Warning: Use of undefined constant SCHEMA_GALLEY - assumed 'SCHEMA_GALLEY' (this will throw an Error in a future version of PHP) in ../lib/pkp/includes/functions.inc.php on line 224 .......... .......... PHP Warning: Use of undefined constant SCHEMA_AUTHOR - assumed 'SCHEMA_AUTHOR' (this will throw an Error in a future version of PHP) in ../lib/pkp/includes/functions.inc.php on line 224 .......... .......... PHP Warning: Use of undefined constant SCHEMA_AUTHOR - assumed 'SCHEMA_AUTHOR' (this will throw an Error in a future version of PHP) in ../lib/pkp/includes/functions.inc.php on line 224 .......... .......... [pre-install] [load: upgrade.xml] [version: 3.2.1.4] [code: Installer Installer::checkPhpVersion] [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: Table 'submission_galley_settings' already exists
1º ERROR SOLUTION:
drop table submission_galley_settings;
2º ERROR MESSAGE: (after restoure the database and apply the 1º solution)
$ php tools/upgrade.php upgrade
..........
..........
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning_articleGalleySettings.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning.xml]
[data: dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.xml]
[data: dbscripts/xml/upgrade/3.2.1_preupdate_subeditor_categories.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]
WARNING: The NavigationMenu (ContextId: 20, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 20, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
..........
..........
WARNING: The NavigationMenu (ContextId: 9, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
[code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
[code: Installer Installer::migrateUserAndAuthorNames (skipped)]
[data: dbscripts/xml/upgrade/3.2.0_stylesheet.xml]
[data: dbscripts/xml/upgrade/3.2.0_archiving_settings.xml]
[data: dbscripts/xml/upgrade/3.2.0_update.xml]
[data: dbscripts/xml/upgrade/3.2.0_navigation_menu_items_locale_change.xml]
[code: Installer Installer::migrateSiteLocales]
[code: Installer Installer::migrateSidebarBlocks]
[code: Installer Installer::migrateSiteStylesheet]
[code: Installer Installer::migrateMetadataSettings]
[code: Installer Installer::createLicenseTerms]
[code: Installer Installer::installEmailTemplate]
[code: Installer Installer::changeUserRolesAndStageAssignmentsForStagePermitSubmissionEdit]
[data: dbscripts/xml/upgrade/3.2.0_versioning.xml]
ERROR: Upgrade failed: DB: Column 'publication_id' cannot be null
2º ERROR SOLUTION:
Include code in the file
dbscripts/xml/upgrade/3.2.0_versioning.xml
before and after query execution where be the error (line 186):
<query driver="mysql,mysqli"> UPDATE citations as c
- Include before:
<query driver="mysql,mysqli">ALTER TABLE citations MODIFY publication_id bigint(20) DEFAULT 0;</query>
- Include atfer:
<query driver="mysql,mysqli">DELETE FROM citations WHERE publication_id IS NULL;</query>
<query driver="mysql,mysqli">ALTER TABLE citations MODIFY publication_id bigint(20) NOT NULL DEFAULT 0;</query>
3º ERROR MESSAGE: (after restoure the database and apply the 1º and 2º solutions)
$ php tools/upgrade.php upgrade .......... .......... [data: dbscripts/xml/upgrade/3.2.0_versioning.xml] [data: dbscripts/xml/upgrade/3.2.0_versioning_submissionCategories.xml] [data: dbscripts/xml/upgrade/3.2.0_last_activity.xml] [data: dbscripts/xml/upgrade/3.2.0_url_path.xml] ERROR: Upgrade failed: DB: Data too long for column 'url_path' at row 2
3º ERROR SOLUTION:
Cut excess texts when importing, in the file:
dbscripts/xml/upgrade/3.2.0_url_path.xml
- Change the line (29):
SELECT ist.setting_value
To:
SELECT SUBSTR(ist.setting_value, 1, 64)
- Change the line (38):
SELECT igs.setting_value
To:
SELECT SUBSTR(igs.setting_value, 1, 64)
- Change the line (47):
SELECT gs.setting_value
To:
SELECT SUBSTR(gs.setting_value, 1, 64)
Can someone comment my solution if I’m right or I can improve (how) ?