Errors occurred during installation:

Good day,

I was trying to upgrade from OJS 3.9.9 to OJS 3.4.0.3
I received the following error
Errors occurred during installation:

  • A database error has occurred: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘current_issue_id’ (SQL: alter table journals add current_issue_id bigint null)

in trying to find help I found out that I need to go back to my previous database backup, unfortunately I dont have it. So is there another way I can fix this problem ?

Hi @Pee-Kay,

Do you have the error message from when the first upgrade failure occurred? (That is, when the upgrade attempt was interrupted for the first time?)

Please take a backup now – it may be hard to recover, but it’ll only get tougher if it gets more complicated e.g. by repeated attempts!

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, below are the errors as they were coming and i have fixed most of them but I failed with this one, I am stuck.

[24-Jan-2024 01:41:24 America/Boise] PHP Fatal error: Uncaught Exception: Mailer driver isn’t specified in the application’s config in /home3/cuzaczw/public_html/journals/lib/pkp/classes/core/PKPContainer.php:315
Stack trace:
[24-Jan-2024 13:57:16 UTC] Contact name or email is missing for context(s) with path(s) [dare]. Please set those before upgrading.
[25-Jan-2024 10:59:26 UTC] A row with setting_name=“submissionChecklist” found in table journal_settings without the expected setting_value. Expected an array encoded in JSON but found:
[25-Jan-2024 11:00:22 UTC] SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘at.assoc_type’ in ‘where clause’ (SQL: select distinct at.type_id from announcement_types as at left join journals as c on at.assoc_id = c.journal_id where c.journal_id is null or at.assoc_type <> 256)
[25-Jan-2024 11:08:47 UTC] A row with setting_name=“submissionChecklist” found in table journal_settings without the expected setting_value. Expected an array encoded in JSON but found:
Fix or remove this row before upgrading.
[28-Jan-2024 08:12:16 UTC] SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘at.assoc_id’ in ‘on clause’ (SQL: select distinct at.type_id from announcement_types as at left join journals as c on at.assoc_id = c.journal_id where c.journal_id is null or at.assoc_type <> 256)
[29-Jan-2024 07:17:37 UTC] SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘current_issue_id’ (SQL: alter table journals add current_issue_id bigint null)

Hi @asmecher,

I have the same problem and the same error after trying to upgrade to the latest OJS version. After a few minor errors, which I solved, I now receive this one and do not know how to solve it.
Any idea?

hi, I am stull stuck there. If you get any solution please share

Hi @Lazar_Stosic,

There are several errors listed; can you be more specific about which you’re encountering?

@Pee-Kay, it looks like you’re listing errors from more recent upgrade attempts. In order to figure out the state of your database, I’d need the very first error message you encountered on your first attempt to upgrade. At that point, you should’ve restored from backup – but if you don’t have one, it’ll be necessary to know where the first upgrade failed in order to know the state of your database.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

After upgrading a database from OJS 3.3.0.15 to the latest OJS Version 3.4.0.4, I received the first error:

Errors occurred during installation:

A database error has occurred: A row with “user_id”=“147” and “setting_name”=“preferredPublicName” found in table “user_settings” which will conflict with other rows specific to the locale key “en” after the migration. Please review this row before upgrading. A row with “user_id”=“1152” and “setting_name”=“signature” found in table “user_settings” which will conflict with other rows specific to the locale key “en” after the migration. Please review this row before upgrading. A row with “user_id”=“1221” and “setting_name”=“preferredPublicName” found in table “user_settings” which will conflict with other rows specific to the locale key “en” after the migration. Please review this row before upgrading.

After solving this error and starting a new upgrade I received newone:

Errors occurred during installation:

A database error has occurred: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘at.assoc_type’ in ‘where clause’ (SQL: select distinct at.type_id from announcement_types as at left join journals as c on at.assoc_id = c.journal_id where c.journal_id is null or at.assoc_type <> 256)

And after solving that received:

Errors occurred during installation:

  • A database error has occurred: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘current_issue_id’ (SQL: alter table journals add current_issue_id bigint null)

Now, this one does not know how to solve.

I do not see a duplicate column

Any idea?

Hi @Lazar_Stosic,

Are you restoring from database backup between upgrade attempts? (Did you take a backup before running the first upgrade attempt?)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I do not work with the ‘‘live’’ website. I made copies of the whole website and database and worked with copy. I still have the latest version under the old OJS.

Regards
Lazar

Hi @asmecher

Here is the first error I encountered

[13-Nov-2023 03:18:24 America/Boise] PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in /home2/cuzaczw/public_html/journals/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74
Stack trace:
#0 /home2/cuzaczw/public_html/journals/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Capsule\Manager::connection()
#1 /home2/cuzaczw/public_html/journals/lib/pkp/classes/db/DAO.inc.php(67): Illuminate\Database\Capsule\Manager::__callStatic(‘raw’, Array)
#2 /home2/cuzaczw/public_html/journals/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve(‘SELECT * FROM j…’, Array)
#3 /home2/cuzaczw/public_html/journals/lib/pkp/classes/core/PKPRouter.inc.php(254): ContextDAO->getByPath(‘dare’)
#4 /home2/cuzaczw/public_html/journals/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext(Object(Request), 1)
#5 /home2/cuzaczw/public_html/journals/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter(‘getContext’, 1)
#6 /home2/cuzaczw/public_html/journals/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(102): Request->getContext()
#7 /home2/cuzaczw/public_html/journals/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(63): LazyLoadPlugin->getCurrentContextId()
#8 /home2/cuzaczw/public_html/journals/plugins/generic/tinymce/TinyMCEPlugin.inc.php(24): LazyLoadPlugin->getEnabled(NULL)
#9 /home2/cuzaczw/public_html/journals/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): TinyMCEPlugin->register(‘generic’, ‘plugins/generic…’, NULL)
#10 /home2/cuzaczw/public_html/journals/lib/pkp/classes/plugins/PluginRegistry.inc.php(142): PluginRegistry::register(‘generic’, Object(TinyMCEPlugin), ‘plugins/generic…’, NULL)
#11 /home2/cuzaczw/public_html/journals/lib/pkp/classes/core/Dispatcher.inc.php(133): PluginRegistry::loadCategory(‘generic’, true)
#12 /home2/cuzaczw/public_html/journals/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#13 /home2/cuzaczw/public_html/journals/index.php(68): PKPApplication->execute()
#14 {main}
thrown in /home2/cuzaczw/public_html/journals/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

1 Like

please help, I am currently stuck is there ant solution for this problem

1 Like

hi Pee-Kay

In following your thread, I discovered you have one of the same errors I have & you solved it.
How did you resolve the error below?

  • A database error has occurred: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘at.assoc_type’ in ‘where clause’ (SQL: select distinct at.type_id from announcement_types as at left join journals as c on at.assoc_id = c.journal_id where c.journal_id is null or at.assoc_type <> 256)

I have this same error when upgrading an cannot find a solution. Do you recall what your fix was? and would you please share it?

Hi @Pee-Kay,

Hmm, if you have the entire error log, and know the approximate date/time of the first failed upgrade attempt, would you be willing to send it to me? That might be quicker than talking it over via the forum.

Thanks,
Alec Smecher
Public Knowledge Project Team

hi,
I added the column that was not found directly into the database

1 Like

Hi, I managed to do a fresh install and i used my back up database. so now I want to upgrade my plugins but there is no option for a gallery on my installation so which platform can I use to download plugins

Hi @Pee-Kay,

Could you start a new topic with that question? Include your OJS version, any relevant screenshots, etc. That’ll help keep the forum organized, as this thread has already gotten pretty tangled!

Thanks,
Alec Smecher
Public Knowledge Project Team

Has anyone solved the problem mentioned above?

Add both columns “assoc_type” and “assoc_id”
Issue will be resolved

1 Like