Error (database?) after updating OJS version from 3.2.1.4 to 3.3.0.21

I updated my OJS system from version 3.2.1.4 to 3.3.0.21 and I’m having trouble uploading author submission files to the system. The files remain “loading…” and I don’t receive the files. I had some problems during the update process, with database errors indicating that the table already existed in the database when running the upgrade (php tools/upgrade.php upgrade).

I think the problem was these commands in the database deleting tables, which caused this single current problem of not being able to upload the files submitted by the authors in my OJS system.

Commands I executed in the database:

First, I had to update the engine to InnoDB and then I executed:

SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE navigation_menu_items ADD url VARCHAR(255) NULL;
ALTER TABLE publications ADD locale VARCHAR(14) NULL;
DROP TABLE IF EXISTS files;
DROP TABLE IF EXISTS jobs;
DROP TABLE IF EXISTS object_for_review_settings;
DROP TABLE IF EXISTS submission_file_revisions;
DROP INDEX IF EXISTS event_log_settings_name_value ON event_log_settings;
DELETE FROM review_assignments WHERE review_round_id IS NULL;
SET FOREIGN_KEY_CHECKS = 1;
EXIT;

After that, I successfully ran the upgrade command, but I’m having this problem loading the author submission data.

Could someone help me?

I still have access to a backup of everything (OJS and database), but I would prefer not to revert to the previous version.

Here are some of the errors I was receiving, which is why I used these commands in the database:

Upgrade failed: DB: SQLSTATE[01000]: Warning: 1265 Data truncated for column ‘review_round_id’ at row 1 (SQL: ALTER TABLE review_assignments CHANGE review_round_id review_round_id BIGINT NOT NULL)

Base table or view already exists: 1050 Table ‘files’ already exists (SQL: create table `files` (`file_id` bigint unsigned not null auto_increment primary key, `path` varchar(255) not null, `mimetype` varchar(255) not null) default character set utf8 collate ‘utf8_general_ci’)

Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘url’ in ‘field list’ (SQL: select `url`, `navigation_menu_item_id` from `navigation_menu_items` where `context_id` = 3)

Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘p.locale’ in ‘field list’ (SQL: update `submissions` as `s` inner join `publications` as `p` on `p`.`publication_id` = `s`.`current_publication_id` set `s`.`locale` = p.locale)

Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name ‘event_log_settings_name_value’ (SQL: CREATE INDEX event_log_settings_name_value ON event_log_settings (setting_name(50), setting_value(150)))

Sorry, I discovered that wasn’t the error; I managed to do a clean update now, without changing anything in the database except for the InnoDB engine, which is necessary. So I’ll close this thread and discuss the actual error in a new one.

1 Like