Loss of all of articles upgrading ojs-3.1.2.4 to ojs-3.2.0-3

I have installed and working well with ojs-3.1.2.4, however when upgrading to ojs-3.2.0-3, I am getting the error and below, resulting in the loss of all of articles name and published pdf.

I appreciate the help
[]'s
Augusto

About facilities:
Postgres 9.5 + PHP 7.2 + Apache-2.4 + OJS-3.2.0-3
Test unsuccessful with branches: ojs-3.2.0; ojs-3.2.0-3; ojs-master; ojs-stable_3.2.0

It was able to partially migrate the system:
From:
Code version: 3.1.2.4
Database version: 3.1.2.4
Latest version: 3.2.0.3

To:
Code version: 3.2.0.3
Database version: 3.2.0.3
Latest version: 3.2.0.3
Your system is up to date

The original database was dumped from production server, and restored in new database.
Some cracks were made to correct long entries to correct this error “ERROR: too long value for character type to vary (64)”

Afther, I run upgrade tools resulting upgrade success, with some warnings, but all articles and pdf are gone.
ojs-3.2.0-3/tools # php upgrade.php upgrade

WARNING: The NavigationMenu (ContextId: 7, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

SELECT * FROM issue_galley_settings WHERE setting_name=‘pub-id::publisher-id’ AND LENGTH(setting_value) >= 64;
galley_id | locale | setting_name | setting_value | setting_type
-----------±-------±---------------------±---------------------------------------------------------------------------±-------------
42 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 12, n. 3, pp. 01-70, set.-dez., 2017 | string
47 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 13, n. 1, pp. 01-93, jan.-abr., 2018 | string
48 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 13, n. 2, pp. 01-73, maio-ago., 2018 | string
49 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 13, n. 3, pp. 1-96, set.-dez., 2018 | string
50 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 14, n. 1, pp. 1-97, jan.-abr., 2019 | string
51 | | pub-id::publisher-id | Kant e-Prints, Campinas, Série 2, v. 14, n. 2, pp. 1-51, maio-ago., 2019 | string
(6 rows)

seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.14, N.2, pp. 01-51 Mai-Ago 2019’ WHERE galley_id = 51;
UPDATE 1
seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.14, N.1, pp. 01-97 Jan-Abr 2019’ WHERE galley_id = 50;
UPDATE 1
seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.13, N.3, pp. 01-96 Set-Dez 2018’ WHERE galley_id = 49;
UPDATE 1
seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.13, N.1, pp. 01-93 Jan-Abr 2018’ WHERE galley_id = 47;
UPDATE 1
seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.12, N.3, pp. 01-70 Set-Dez 2017’ WHERE galley_id = 42;
UPDATE 1
seerojsdatabasenew=# update issue_galley_settings SET setting_value = ‘Kant e-Prints, S2, V.13, N.2, pp. 01-73 Mai-Ago 2018’ WHERE galley_id = 48;
UPDATE 1
seerojsdatabasenew=# SELECT * FROM issue_galley_settings WHERE setting_name=‘pub-id::publisher-id’ AND LENGTH(setting_value) >= 64;
galley_id | locale | setting_name | setting_value | setting_type
-----------±-------±-------------±--------------±-------------
(0 rows)

seerojsdatabasenew=# SELECT * FROM issue_settings WHERE setting_name=‘pub-id::publisher-id’ AND LENGTH(setting_value) >= 64;
issue_id | locale | setting_name | setting_value | setting_type
----------±-------±-------------±--------------±-------------
(0 rows)

1 2 3

Hi @torres,

Could you include the complete output of your upgrade script? Also, does anything helpful appear in your PHP error log?

Thanks,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher
Forward system logs.
Performed basic reset and new restoration to generate fidelity in the logs
Thanks a lot
Augusto Torres

Log Apache: “Before” run “php upgrade.php upgrade”

[Wed May 13 15:13:40.731817 2020] [php7:error] [pid 3460] [client 177.194.48.204:55150] PHP Fatal error:

Uncaught Exception: DB Error: ERROR: relation “publications” does not exist\nLINE 1: …*, “po”.“seq” from “submissions” as “s” left join

"publicati…\n

^ Query: select “s”.*, “po”.“seq” from “submissions” as “s” left join “publications” as “po” on “s”.“current_publication_id” = “po”.“publication_id”

left join “publications” as “issue_p” on “issue_p”.“submission_id” = “s”.“submission_id” left join “publication_settings” as

“issue_ps” on “issue_p”.“publication_id” = “issue_ps”.“publication_id” where “s”.“context_id” = ? and “s”.“status” in (?) and

(“issue_ps”.“setting_name” = ? and “issue_ps”.“setting_value” in (?)) group by “s”.“submission_id”, “po”.“seq” order by “po”.“seq” asc

in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/db/DAO.inc.php:703\nStack trace:\n#0 /usr/local/www/data/ojs-3.2.0-3/lib/pkp/

classes/db/DAO.inc.php(103): DAO->handleError(Object(ADODB_postgres7),

‘select “s”.*, "…’)\n#1 /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/db/DAO in

/usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/db/DAO.inc.php on line 703, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

Log Apache: “Afther” run “php upgrade.php upgrade”

[Wed May 13 15:20:40.302164 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: mkdir(): Permission denied in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/file/FileManager.inc.php on line 311, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.302240 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: assert(): assert(false) failed in /usr/local/www/data/ojs-3.2.0-3/plugins/generic/usageStats/UsageStatsPlugin.inc.php on line 732, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.349817 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: mkdir(): Permission denied in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/file/FileManager.inc.php on line 311, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.349851 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: assert(): assert(false) failed in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php on line 57, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.349881 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: fopen(): Filename cannot be empty in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php on line 111, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.349898 2020] [php7:warn] [pid 3433] [client 177.194.48.204:55216] PHP Warning: flock() expects parameter 1 to be resource, bool given in /usr/local/www/data/ojs-3.2.0-3/lib/pkp/classes/scheduledTask/ScheduledTask.inc.php on line 112, referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

[Wed May 13 15:20:40.349921 2020] [php7:notice] [pid 3433] [client 177.194.48.204:55216] ojs2: Couldn’t lock the file., referer: https://www.cle.unicamp.br/ojs-3.2.0-3/

Results about upgrade:

php upgrade.php upgrade

[pre-install]

[load: upgrade.xml]

[version: 3.2.0.3]

[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 (skipped)]

[data: dbscripts/xml/upgrade/3.2.0_preupdate_versioning.xml]

[data: dbscripts/xml/upgrade/3.2.0_preupdate_last_activity.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: 7, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 7, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 3, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 3, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 6, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 6, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 8, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 8, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 4, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 4, 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]

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

[code: Installer Installer::setStatsEmailSettings]

[code: Installer Installer::fixLibraryFiles]

[code: Installer Installer::installEmailTemplate]

[note: docs/release-notes/README-3.2.0]

[code: Installer Installer::addPluginVersions]

[post-install]

Release Notes


OJS 3.2.0-3 Release Notes

Git tag: 3_2_0-3

Hi @torres,

It looks like there are some file permission problems during the upgrade; I’d suggest trying it again, but first making sure that OJS can administer the contents of the files_dir. If you’re using mod_php, then the ownership of that directory’s contents might be www-data, and you might have to chown them over to your own user account before running the upgrade script, since you’re running it from the command line under your own account. Then when you finish, chown it back to restore it to ownership compatible with the web-based PHP interpreter.

Regards,
Alec Smecher
Public Knowledge Project Team

Helo @asmecher

I’m stil working to resolve thie upgrade. Not resolved yet:-(
A little more about this case:
It seemed that when I migrate from the old system to the newer system, all tables, indexes and keys are also migrated. However, all indexing is broken and some tables are blocking null entries
Tks
Augusto

Look (afther upgrade):

I changed this table because it was not possible to insert an author by inserting a new article with [QuickSubmit Plugin]
ALTER TABLE authors ALTER COLUMN submission_id DROP NOT NULL;

Also I can create new issue and admistrate without problems, but all of issues imported are blocked, and when I try do delete, appear this error:
ERROR: duplicate key value violates unique constraint “controlled_vocab_symbolic”
DETAIL: Key (symbolic, assoc_type, assoc_id)=(submissionAgency, 1048588, 4) already exists.
STATEMENT: INSERT INTO controlled_vocabs
(symbolic, assoc_type, assoc_id)
VALUES
( $1, $2, $3)

This entries bellow doesn’t resolve the this problem

SELECT MAX(controlled_vocab_id) FROM public.controlled_vocabs;
max

1781500
(1 row)

SELECT nextval(‘controlled_vocabs_controlled_vocab_id_seq’);
nextval

1783794
(1 row)

SELECT setval(‘controlled_vocabs_controlled_vocab_id_seq’, (SELECT MAX(controlled_vocab_id) FROM public.controlled_vocabs)+1);
setval

1781501
(1 row)

However, all articles are imported but loose all of indexes.

Dear @asmecher,
Almost there!!!
Finally I made upgrade but…
First I needed to do upgrade to ojs-3.2.0.2 and afther to the ojs-3.2.0-3

All of autors gone
eprints6
I can create new issue and insert authors and another settings, but I can’t delete any issue:

ERROR: duplicate key value violates unique constraint “controlled_vocab_symbolic”
DETAIL: Key (symbolic, assoc_type, assoc_id)=(submissionKeyword, 1048588, 551) already exists.
INSERT INTO controlled_vocabs
(symbolic, assoc_type, assoc_id)
VALUES
( $1, $2, $3)

SOME DATABASE MODIFICATIONS

Dump your database, restore on new database
ALTER TABLE author_settings ALTER COLUMN setting_type DROP NOT NULL;
ALTER TABLE journal_settings ALTER COLUMN setting_type DROP NOT NULL;
and run

Edit th config.inc.php and
config.ini.driver = postgres (not postgres7)
php upgrade.php upgrade

Thanks a lot

(Continued here: [Solved] Some contributor list articles disappear after upgrading from ojs 3.1.2.4 to 3.2.0.2 - #8 by asmecher)