Fatal error during an upgrade OJS 3.2 -> 3.3

Hi, i’m having problem with an upgrade of OJS 3.2.1-4 → 3.3.0. Error i get is:

PHP Warning: array_values() expects parameter 1 to be array, null given in /ojs-3.3/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php on line 187
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Illuminate\Database\Query\Builder::cleanBindings() must be of the type array, null given, called in /ojs-3.3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php on line 919 and defined in /ojs-3.3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:3088
Stack trace:
#0 /ojs-3.3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(919): Illuminate\Database\Query\Builder->cleanBindings()
#1 /ojs-3.3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(946): Illuminate\Database\Query\Builder->whereIn()
#2 /ojs-3.3/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php(191): Illuminate\Database\Query\Builder->whereNotIn()
#3 /ojs-3.3/lib/pkp/classes/install/Installer.inc.php(405): PKPv3_3_0UpgradeMigration->up()
#4 /ojs-3.3/lib/pkp/classes/install/Installer.inc.php(2 in /ojs-3.3/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php on line 3088

Anybody knows what could be the problem? Thx.

Regards.

Ok, i dived into debugging this and this is what i came up with. The problem is in line 187 of /ojs-3.3/lib/pkp/classes/migration/upgrade/PKPv3_3_0UpgradeMigration.inc.php:

$locales = empty($row->locales) ? [] : json_decode($row->locales, true);

This line assumes that data stored in journal_settings table (setting_value field) is stored in json format but actually it’s just serialized, so this json_decode returns NULL. If i change json_decode to unserialize function then i get proper array values for locales. Is this a bug in migration script or? Thx.

Regards.

Hi @orcalator,

Are you using an old OJS 3.3.0-x package? It appears to be an already-resolved issue:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

Thank you for help. Yes, i’m trying first to do an upgrade from 3.2 → 3.3 and then to 3.4 (latest), because when i tried to go from 3.2 → 3.4 i got an error that’s reported here OJS post upgrade issue : unserialize DAO.inc.php - #10 by orcalator. Btw. my upgrade takes 12h to end with this error. Is it really necessary for this upgrade script to last so long?

Regards

Hi @orcalator,

I’d recommend upgrading directly to the latest 3.3.0-x, rather than using an older package.

The OJS 3.2 to 3.3 upgrade rearranges the file storage area and works with those records individually, which is unfortunately quite a slow process. We’ve made changes to ensure that future upgrades run a lot quicker, but I’m afraid that’s one upgrade you’ll have to suffer through on a larger installation.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thank you for explanation. Now i tried upgrading to the 3.3.0.9 version. All went fine, but css is not present and what is more strange, when i click on “Platform & workflow by OJS/PKP” image to check the installed version i get 3.2.1.4 (so old version that i want to update). Do you have any clues?

Regards.

Hi @orcalator,

The latest 3.3.0-x is currently 3.3.0-18; version 3.3.0-9 is significantly older.

It sounds like the upgrade didn’t complete succesfully; did you get an error message?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yeah, i was going for the last non LTS version, but ok, i will try with 3.3.0-18. In the end of upgrade i got a message saying that i have some plugin that can not be downgraded. Probably i have newer version of plugin on 3.2.1.4 and by default 3.3.0.9 comes with older plugin version. Maybe that caused upgrade script not to finish, although it looked like it did.

Btw. is there any log from upgrade script?

Regards.

Hi @orcalator,

Are you clicking the “Upgrade” button in the web-based installation form? If so, you won’t get much feedback from the upgrade process, and the upgrade tool is subject to server-side time limits that might force it to stop before it’s complete. I’d recommend using the command-line upgrade tool (tools/upgrade.php).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

No, i’m using command line. I managed to upgrade to 3.3.0.17 and now i’m trying to do upgrade to 3.4.x. Have some issues with myisam/innodb, but i will resolve that and then i’ll get back with the next error :slight_smile:

Regards.

1 Like