Error on upgrade to OJS 3.5

We also encounter errors during upgrading from #3.4 to #3.5. In case we drop the column, it generates it automatically even if we try upgrading with a fresh setup.

Errors occurred during installation:

A database error has occurred: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘redirect_context_id’ (Connection: mysql, SQL: alter table site rename column redirect to redirect_context_id)
Errors occurred during installation:

A database error has occurred: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘redirect’ in ‘site’ (Connection: mysql, SQL: alter table site modify redirect bigint null)

Hi @Rohaan123,

In your OJS 3.4.0-x database (previous to running the upgrade), what do you get for the following query?

SHOW CREATE TABLE site;

Regards,
Alec Smecher
Public Knowledge Project Team

its shows like this
site
CREATE TABLE site (
site_id bigint unsigned …

Hi @Rohaan123,

I’d need to see the full message.

Thanks,
Alec Smecher
Public Knowledge Project Team

[xxx@xxxjik.]# php tools/upgrade.php check
Code version: 3.5.0.0
Database version: 3.4.0.9
Latest version: 3.5.0.0
Database version is older than code version
Run “tools/upgrade.php upgrade” to update
[xxxx@xxxxx]# php tools/upgrade.php upgrade
2025-06-18 03:57:13 [pre-install]
2025-06-18 03:57:13 [load: upgrade.xml]
2025-06-18 03:57:13 [version: 3.5.0.0]
2025-06-18 03:57:13 [code: Installer Installer::checkPhpVersion]
2025-06-18 03:57:13 [code: Installer Installer::installDefaultNavigationMenus]
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: , Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
2025-06-18 03:57:13 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]
2025-06-18 03:57:13 [migration: APP\migration\upgrade\v3_4_0\I9813_QuickSubmitSubmissionProgressType]
2025-06-18 03:57:13 [migration: APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate]
2025-06-18 03:57:13 [migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration]
2025-06-18 03:57:13 [migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys]
2025-06-18 03:57:13 [migration: APP\migration\upgrade\v3_5_0\I9892_FloatToDecimalColumnTypeUpdate]
2025-06-18 03:57:13 [migration: PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile]
2025-06-18 03:57:13 [migration: PKP\migration\upgrade\v3_5_0\I9678_RemoveScheduledTasksTable]
2025-06-18 03:57:13 [migration: PKP\migration\upgrade\v3_5_0\InstallEmailTemplates]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I9253_SiteAnnouncements]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I9262_Highlights]
2025-06-18 03:57:14 [migration: APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I9462_UserUserGroupsStartEndDate]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I9552_UserGroupsMasthead]
2025-06-18 03:57:14 [migration: PKP\migration\upgrade\v3_5_0\I5504_UserGroupsSettings]
2025-06-18 03:57:14 [migration: APP\migration\upgrade\v3_5_0\I9425_SeparateUIAndSubmissionLocales]
2025-06-18 03:57:14 [revert migration: PKP\migration\upgrade\v3_5_0\I5504_UserGroupsSettings]
2025-06-18 03:57:14 [revert migration: PKP\migration\upgrade\v3_5_0\I9552_UserGroupsMasthead]
2025-06-18 03:57:14 [revert migration: PKP\migration\upgrade\v3_5_0\I9462_UserUserGroupsStartEndDate]
2025-06-18 03:57:14 [revert migration: APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles]
2025-06-18 03:57:14 [downgrade for “APP\migration\upgrade\v3_5_0\I9475_RecoverLayoutFiles” unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘’‘’ at line 1 (Connection: mysql, SQL: alter table email_templates_default_data modify locale varchar(28) not null default ‘‘en’’)

I have also have an error durring the updte from 3.4.0.9

SHOW CREATE TABLE SITE;

MySQL said: Documentation

#1146 - Table 'ade_jik.SITE' doesn't exist

its Work with this Fix

> Fix

please check

Hi @Rohaan123,

Go into “Extra Options” and choose “Full Texts”. Then re-run the query to get the complete output.

Regards,
Alec Smecher
Public Knowledge Project Team

Table Create Table
site CREATE TABLE site ( site_id bigint unsigned NOT NULL AUTO_INCREMENT, redirect bigint NOT NULL DEFAULT ‘0’ COMMENT ‘If not 0, redirect to the specified journal/conference/… site.’, primary_locale varchar(14) NOT NULL COMMENT ‘Primary locale for the site.’, min_password_length smallint NOT NULL DEFAULT ‘6’, installed_locales varchar(255) NOT NULL DEFAULT ‘en’ COMMENT ‘Locales for which support has been installed.’, supported_locales varchar(1024) DEFAULT NULL COMMENT ‘Locales supported by the site (for hosted journals/conferences/…).’, original_style_file_name varchar(255) DEFAULT NULL, PRIMARY KEY (site_id) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3

Hi @Rohaan123,

If you’re using the web-based upgrade tool, can you try again using the command-line tool (tools/upgrade.php) and posting the complete output? (As usual, you’ll need to restore from backup first; don’t drop the column or make any changes before you do.)

Regards,
Alec Smecher
Public Knowledge Project Team

For other pages such as settings and administrative settings.

Error

An unexpected error has occurred. Please reload the page and try again.

After using the command line the ojs is upgraded but the database is not fully upgraded. its not showing any submissions data.

Error

You are not authorized to access the requested resource.

Then we try again then
baseos | immi.se | u2438-ck9vsv3bmeak@gcam1001.siteground.biz:~/www/immi.se/public_html/ojs3.5$ php tools/upgrade.php upgrade

2025-06-18 20:31:00 [pre-install]

2025-06-18 20:31:00 [load: upgrade.xml]

2025-06-18 20:31:00 [version: 3.5.0.0]

2025-06-18 20:31:00 [code: Installer Installer::checkPhpVersion]

2025-06-18 20:31:00 [code: Installer Installer::installDefaultNavigationMenus]

2025-06-18 20:31:00 [code: Installer Installer::migrateStaticPagesToNavigationMenuItems]

2025-06-18 20:31:00 [migration: APP\migration\upgrade\v3_4_0\I9813_QuickSubmitSubmissionProgressType]

2025-06-18 20:31:00 [migration: APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate]

2025-06-18 20:31:01 [migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration]

2025-06-18 20:31:01 [migration: APP\migration\upgrade\v3_5_0\I8333_AddMissingForeignKeys]

2025-06-18 20:31:01 [revert migration: PKP\migration\upgrade\v3_5_0\PreflightCheckMigration]

2025-06-18 20:31:01 [An upgrade step failed! Fallback set to 3.4.9.9. Check and correct the error and try the upgrade again. We recommend restoring from backup, though you may be able to continue without doing so.]

ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘redirect’ in ‘site’ (Connection: mysql, SQL: alter table site modify redirect bigint null)

https://drive.google.com/file/d/1mE3R9RXPLkR_g97jhF2GMADjiC2n1P0z/view?usp=sharing

Hi @Rohaan123,

It looks like you haven’t been able to complete the upgrade and are possibly working with a database that’s been corrupted by a failed upgrade.

Before running an upgrade, make sure to start with a clean database. If you try an upgrade and it fails, you’ll need to restore from a backup taken before you tried to first run an upgrade. Then correct any data errors error before trying again.

Until you complete the upgrade process, you won’t be able to use OJS 3.5.0 without encountering errors. If you go back to your OJS 3.3.0 or 3.4.0 code, unless you restore your database from backup, you’ll likewise encounter errors.

You should always take a complete backup before trying to upgrade. If you didn’t, then make sure to capture the error message you encountered, as it’ll help determine where in the upgrade the process failed, and from there what needs to be corrected and what steps still need to be executed.

If you didn’t take a backup, and didn’t capture the first error message (and tried to re-run the upgrade again) things can get quite complicated.

Can you describe what kind of a backup you’ve got, and if it’s clean, what the first error you encounter on trying to run the upgrade?

Regards,
Alec Smecher
Public Knowledge Project Team

I have a complete backup. I made a duplicate copy of the setup, including the database. So, after reuploading the backup database, we now encounter an error which was shared before. Even if we use the command line or web upgrade.

How To Fix error upgrade 3.4 to 3.5 sir ?

We are facing the same issue. It is not solved yet.

Hi @Rohaan123,

What is the error message you encounter on a first upgrade attempt with a 3.4.0-x database using the command line? (Could you include the complete output?) There are several different errors mentioned here.

Thanks,
Alec Smecher
Public Knowledge Project Team

Any date for OJS 3.5 to be available in Softaculous? My upgrade until 3.4.0.9, and it is working well.