Problem with upgrading OSJ 2.4.8.5 to 3.3.x, context_id missing from plugin_settings

I’m attempting to upgrade OJS 2.4.8.5 to the latest 3.3.x. I was trying to upgrade to 3.2.x but then I got stuck on the publication_settings.setting_value MEDIUMTEXT problem so I switch to 3.3.x. In the 3.3.x code I’ve already resolved the missing PDO connection issue and another sql issue, but now i’m running into this database error:

SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND context_id = ?

Fatal error : Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘context_id’ in ‘where clause’ in /var/www_tfc/public_html/journals4/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78

First I verify that I’m using an fresh copy of my 2.4.8.5 database, no previous 3.2.x or 3.3.x upgrade attempted on it. When I review my existing 2.4.8.5 database I see that column context_id is not in the plugin_settings table. Prior to this upgrade, I upgraded my instance from 2.2.3 to 2.4.8.5, and I verified there the column does not exist in the 2.2.3 database either.

It seems like an internal update may have been skipped, since it’s trying to insert to a column that has never existed?

Any insight to the cause of this issue will be helpful.
Thank you.

Hi @Jafucius,

I would try to upgrade to 3.0 first.

Hi @Jafucius that is what I’m doing right now too, upgrade our OJS 2.4 to 3.3.x.

Then what am I doing:

  • upgrade 2.4 to 2.8 ( in my case it’s start from version 2.4)
  • upgrade 2.8 to 3.0.2 first (3.0.0 and 3.0.1 failed) - success
  • upgrade 3.0.2 to 3.1.2.4 - success
  • upgrade 3.1.2.4 to 3.2.1.4 - success
  • currently I’m in progress upgrading it to 3.3 …
1 Like

Hi all,

I would actually recommend upgrading in fewer steps – you should be able to go from 2.4.x to the newest 3.2.x, then from there to 3.3.0 if you like.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes

hello @asmecher thanks for the advice on this issue.

Yesterday I had gone back to attempting the upgrade from 2.4.8 to 3.2.1, however i still needed to get passed the publication_settings.setting_value MEDIUMTEXT issue, so I devised a workaround shown in the attached image. I didn’t consider open a request to merge because I saw you already merged a fix in 3.3.x.
Screen Shot 2021-02-12 at 9.55.24 AM

That workaround allowed the 3.2.1 upgrade script to successfully finish, however when navigating through the new site there seems to be a problem with links in the Journal. I’ll create a new post for that problem, but this issue could serve as context.

Thanks again

1 Like

Same problem here. I’ve been able to upgrade from ojs-2.4.3-0 to ojs-2_4_8-5 successfully but when I try to upgrade to any 3.x version I get the same error. What could I be making wrong? I’m blocked.

Hi @isaac.marco,

Can you describe your upgrade and the problem you’re encountering in more detail?

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher, thank for reply. I’m not sure why the problem was. Yesterday I was able to upgrade to ojs33 from ojs24. I think the problem was because when an upgrade was aborted I tried to solve it and continue.

Now I have been repeating all the upgrade steps every time I found some problem and now I have a my custom recipe to upgrade successfully.

1 Like

Hi Alec
I have the same problem i think. currently our ojs version is OJS 2.4.8.5. and i got error message provided below. i have tried upgrade to the latest versions of OJS.3.2.x and O.J.S.3.3.x
I will be happy if you can assist to solve my upgrade problem.
Best
Baris

Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘context_id’ in ‘where clause’ in /rootfolder/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78
Stack trace:
#0 /rootfolder/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(78): PDO->prepare(‘SELECT setting_…’, Array)
#1 /rootfolder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(361): Doctrine\DBAL\Driver\PDOConnection->prepare(Object(Illuminate\Database\Query\Expression))
#2 /rootfolder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /rootfolder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(Object(Illumina in /rootfolder/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671

Hi @Baris_Kiremitci,

This is an older thread: could you create a new post and include your message there, please? This will help keep the forum more organized.

Best regards,

Roger
PKP Team