Upgrade Ojs 3.3.0-17 to Ojs 3.4.0-6 error (with postgres)

I am updating the system from version 3.3.0-17 to 3.3.0.6 and I am encountering the following message:

2024-09-08 19:09:44 [migration: APP\migration\upgrade\v3_4_0\PreflightCheckMigration]
2024-09-08 19:09:44 [A pre-flight check failed. The software was successfully upgraded to 3.3.9.9 but could not be upgraded further (to 3.4.0.6). Check and correct the error, then try again.]
PHP Fatal error:  Uncaught ValueError: Path cannot be empty in /var/www/ojs-3.4.0-6/lib/pkp/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php:246
Stack trace:
#0 /var/www/ojs-3.4.0-6/lib/pkp/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php(246): SplFileObject->__construct('', 'r')
#1 /var/www/ojs-3.4.0-6/lib/pkp/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php(234): PKP\migration\upgrade\v3_4_0\PreflightCheckMigration->checkUsageStatsLogFileUrl('')
#2 /var/www/ojs-3.4.0-6/lib/pkp/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php(49): PKP\migration\upgrade\v3_4_0\PreflightCheckMigration->checkUsageStatsLogs()
#3 /var/www/ojs-3.4.0-6/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php(28): PKP\migration\upgrade\v3_4_0\PreflightCheckMigration->up()
#4 /var/www/ojs-3.4.0-6/lib/pkp/classes/install/Installer.php(463): APP\migration\upgrade\v3_4_0\PreflightCheckMigration->up()
#5 /var/www/ojs-3.4.0-6/lib/pkp/classes/install/Installer.php(294): PKP\install\Installer->executeAction(Array)
#6 /var/www/ojs-3.4.0-6/lib/pkp/classes/install/Installer.php(209): PKP\install\Installer->executeInstaller()
#7 /var/www/ojs-3.4.0-6/lib/pkp/classes/cliTool/UpgradeTool.php(96): PKP\install\Installer->execute()
#8 /var/www/ojs-3.4.0-6/lib/pkp/classes/cliTool/UpgradeTool.php(69): PKP\cliTool\UpgradeTool->upgrade()
#9 /var/www/ojs-3.4.0-6/tools/upgrade.php(22): PKP\cliTool\UpgradeTool->execute()
#10 {main}
  thrown in /var/www/ojs-3.4.0-6/lib/pkp/classes/migration/upgrade/v3_4_0/PreflightCheckMigration.php on line 246
[root@ojs4-andre ojs-3.4.0-6]#

What could be causing this error?

By the way, when I tried to update to version 3.4.0-3 or 3.4.0-5, I encountered the following error:

[migration: PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings]
Exception: Plugin classic expected to inherit from ClassicThemePlugin, actual type NULL in /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php:203
Stack trace:
#0 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin('themes', 'classic', 'ClassicThemePlu...')
#1 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase('themes', 43)
#2 /var/www/ojs-3.4.0-3/lib/pkp/classes/migration/upgrade/v3_4_0/I6782_UsageStatsSettings.php(111): PKP\plugins\PluginRegistry::loadCategory('themes', true, 43)
#3 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(463): PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings->up()
#4 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(294): PKP\install\Installer->executeAction(Array)
#5 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(209): PKP\install\Installer->executeInstaller()
#6 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(96): PKP\install\Installer->execute()
#7 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(69): PKP\cliTool\UpgradeTool->upgrade()
#8 /var/www/ojs-3.4.0-3/tools/upgrade.php(22): PKP\cliTool\UpgradeTool->execute()
#9 {main}
Exception: Plugin classicNavy expected to inherit from PKP\plugins\Plugin, actual type NULL in /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php:203
Stack trace:
#0 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin('themes', 'classicNavy', 'PKP\\plugins\\Plu...')
#1 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase('themes', 12)
#2 /var/www/ojs-3.4.0-3/lib/pkp/classes/migration/upgrade/v3_4_0/I6782_UsageStatsSettings.php(111): PKP\plugins\PluginRegistry::loadCategory('themes', true, 12)
#3 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(463): PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings->up()
#4 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(294): PKP\install\Installer->executeAction(Array)
#5 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(209): PKP\install\Installer->executeInstaller()
#6 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(96): PKP\install\Installer->execute()
#7 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(69): PKP\cliTool\UpgradeTool->upgrade()
#8 /var/www/ojs-3.4.0-3/tools/upgrade.php(22): PKP\cliTool\UpgradeTool->execute()
#9 {main}
Exception: Plugin classicRed expected to inherit from PKP\plugins\Plugin, actual type NULL in /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php:203
Stack trace:
#0 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin('themes', 'classicRed', 'PKP\\plugins\\Plu...')
#1 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase('themes', 12)
#2 /var/www/ojs-3.4.0-3/lib/pkp/classes/migration/upgrade/v3_4_0/I6782_UsageStatsSettings.php(111): PKP\plugins\PluginRegistry::loadCategory('themes', true, 12)
#3 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(463): PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings->up()
#4 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(294): PKP\install\Installer->executeAction(Array)
#5 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(209): PKP\install\Installer->executeInstaller()
#6 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(96): PKP\install\Installer->execute()
#7 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(69): PKP\cliTool\UpgradeTool->upgrade()
#8 /var/www/ojs-3.4.0-3/tools/upgrade.php(22): PKP\cliTool\UpgradeTool->execute()
#9 {main}
Exception: Plugin redbar expected to inherit from PKP\plugins\Plugin, actual type NULL in /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php:203
Stack trace:
#0 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(219): PKP\plugins\PluginRegistry::_instantiatePlugin('themes', 'redbar', 'PKP\\plugins\\Plu...')
#1 /var/www/ojs-3.4.0-3/lib/pkp/classes/plugins/PluginRegistry.php(112): PKP\plugins\PluginRegistry::_loadFromDatabase('themes', 12)
#2 /var/www/ojs-3.4.0-3/lib/pkp/classes/migration/upgrade/v3_4_0/I6782_UsageStatsSettings.php(111): PKP\plugins\PluginRegistry::loadCategory('themes', true, 12)
#3 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(463): PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings->up()
#4 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(294): PKP\install\Installer->executeAction(Array)
#5 /var/www/ojs-3.4.0-3/lib/pkp/classes/install/Installer.php(209): PKP\install\Installer->executeInstaller()
#6 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(96): PKP\install\Installer->execute()
#7 /var/www/ojs-3.4.0-3/lib/pkp/classes/cliTool/UpgradeTool.php(69): PKP\cliTool\UpgradeTool->upgrade()
#8 /var/www/ojs-3.4.0-3/tools/upgrade.php(22): PKP\cliTool\UpgradeTool->execute()
#9 {main}
2024-09-07 15:07:46 [revert migration: APP\migration\upgrade\v3_4_0\I6782_OrphanedMetrics]
2024-09-07 15:07:46 [downgrade for "APP\migration\upgrade\v3_4_0\I6782_OrphanedMetrics" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: Invalid product name "Argumentum_1"

Argumuntum is the name of a journal. I encountered a similar error but couldn’t find a solution:

[Upgrade fails if a theme plugin is installed but not yet copied into the themes directory location · Issue #8415 · pkp/pkp-lib · GitHub](https://github.com/pkp/pkp-lib/issues/8415)

Hi @Adriano_Jose,

This is Upgrade fails if there are no files in usageEventLogs · Issue #10244 · pkp/pkp-lib · GitHub, which is already fixed in the most recent release.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Now, I tested updating to OJS 3.4.0-7 and encountered this error again, but it is further along than the previous update.


l2024-09-12 14:31:36 [migration: PKP\migration\upgrade\v3_4_0\I6782_UsageStatsSettings]
2024-09-12 14:31:47 [revert migration: APP\migration\upgrade\v3_4_0\I6782_OrphanedMetrics]
2024-09-12 14:31:47 [downgrade for "APP\migration\upgrade\v3_4_0\I6782_OrphanedMetrics" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: Invalid product name "Argumentum_1"

In which table should this information ‘Argumentum_1’ be?

Hi @Adriano_Jose,

I suspect this will be in the versions table – but I’ve never heard of Argumentum in the OJS context, so I’m not sure what that is. Maybe a third party plugin?

Regards,
Alec Smecher
Public Knowledge Project Team

Argumentum is the name of one of our journals. It seems that the theme was created back in the OJS2 version. Can I simply remove this line? Another possibility would be to change the name, removing the hyphen. What do you think?

Hi @Adriano_Jose,

I think renaming to remove the hyphen is a good idea. Make sure to match against the plugins/themes directory name, and within the plugins/themes/argumentum/version.xml descriptor.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, thanks.
I made the indicated change and it worked. But now I am encountering the following error:

2024-09-17 21:20:10 [migration: APP\migration\upgrade\v3_4_0\I7470_FixDeprecatedFileStage]
2024-09-17 21:20:25 [note: docs/release-notes/README-3.4.0]
2024-09-17 21:20:25 [migration: PKP\migration\upgrade\v3_4_0\I7249_UpdateUsersUniqueIndex]
2024-09-17 21:20:25 [revert migration: APP\migration\upgrade\v3_4_0\I7470_FixDeprecatedFileStage]
2024-09-17 21:20:25 [downgrade for "APP\migration\upgrade\v3_4_0\I7470_FixDeprecatedFileStage" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[42704]: Undefined object: 7 ERROR:  constraint "users_username" of relation "users" does not exist (SQL: ALTER TABLE users DROP CONSTRAINT users_username;)

On pgAdmin, I executed the ‘delete (cascade)’ command for the indices ‘user_username’ and ‘user_email’, and the next error also asked to delete the indices from the event_log table.

2024-09-15 01:41:44 [revert migration: PKP\migration\upgrade\v3_4_0\I9039_DropDeprecatedFields]
2024-09-15 01:41:44 [downgrade for "PKP\migration\upgrade\v3_4_0\I9039_DropDeprecatedFields" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[42704]: Undefined object: 7 ERROR:  constraint "event_log_user_id_foreign" of relation "event_log" does not exist (SQL: alter table "event_log" drop constraint "event_log_user_id_foreign")
You have new mail in /var/spool/mail/root
[root@ojs4-andre ojs-3.4.0-7]#

So, I also removed ‘event_log_assoc’. However, I encountered the following error after these deletions:

or

2024-09-15 10:41:37 [revert migration: APP\migration\upgrade\v3_4_0\I7129_IssueEntityDAORefactor]
2024-09-15 10:41:40 [revert migration: PKP\migration\upgrade\v3_4_0\I7245_UpdateUserLocaleStringToParsableJsonString]
2024-09-15 10:41:41 [downgrade for "PKP\migration\upgrade\v3_4_0\I7245_UpdateUserLocaleStringToParsableJsonString" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[42830]: Invalid foreign key: 7 ERROR:  there is no unique constraint matching given keys for referenced table "users" (SQL: alter table "user_interests" add constraint "user_interests_user_id_foreign" foreign key ("user_id") references "users" ("user_id") on delete cascade)

What could I do to continue with the update?
Images about
image
image

Hi guys, does anyone have any tips?

This topic was automatically closed after 20 days. New replies are no longer allowed.