Error with plugins when upgrading OJS 3.2.1.1 to 3.3.0.13

When running the upgrade script to upgrade OJS 3.2.1-1 to 3.3.0-13 on a few journals, I got the following errors:

PHP Fatal error: Cannot override final method Plugin::getInstallSchemaFile() in //plugins/generic/pln/PLNPlugin.inc.php on line 683

PHP Fatal error: Cannot override final method Plugin::getInstallSchemaFile() in />/plugins/generic/sword/SwordPlugin.inc.php on line 330

How can I resolve these issues?

Thanks,

Dear Stevel

What PHP version that you use when run the upgrade script ?

Regards
Hendra

Hi Hendra,

I am running PHP 7.3.33.

Thanks,
Steve

Can you remove those both plugin and initiate the upgrade script again?

By remove, do you mean disable them in the plugin list or do I need to delete them from the filesystem? If I need to delete them, do I delete the entire folder inside /plugins? is there something to do in the database as well?

Thanks,
Steve

First of all this just suggestion since the error show duplicate php coding error. Upgrading ojs based on our team experience should be creative.

So you can delete that both folder. No database modification required. Then you can init the upgrade script again. Check that result of the upgrade script again.

Regards
Hendra

I’ve removed the plugins that the check was reporting errors with, but now I reach a new error:

PHP Warning: require_once(/…/lib/pkp/classes/xml/XMLCustomWriter.inc.php): failed to open stream: No such file or directory in /…/lib/pkp/includes/functions.inc.php on line 25
PHP Fatal error: require_once(): Failed opening required ‘/…/lib/pkp/classes/xml/XMLCustomWriter.inc.php’ (include_path=‘.:/usr/share/pear:/usr/share/php’) in /…/lib/pkp/includes/functions.inc.php on line 25

Hi @Stevel,

It sounds like you’re unpacking the new OJS package over top of your existing OJS installation. That’s not the recommended practice – it ends up mixing old plugins with new code. Follow the “Full Package” steps here:

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi Alec,

If I run the upgrade check on a journal running 3.2.1.1, everything is fine. Shouldn’t that mean a smooth upgrade to 3.3?

Code version: 3.2.1.1
Database version: 3.2.1.1
Latest version: 3.3.0.13
A newer version is available:
tag: 3_3_0-13
date: 2022-10-04
info: http://pkp.sfu.ca/ojs/
package: http://pkp.sfu.ca/ojs/download/ojs-3.3.0-13.tar.gz

Thanks,
Steve

Hi @Stevel,

The “check” command is just to show your various versions; it doesn’t test whether or not an upgrade will succeed.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher.

I searched the plugins folder for XMLCustomWriter and it was only called in the generic/lucene subfolder. I deleted it and now the check command no longer returns the error. I’ll keep trying the upgrade and see if I run into any further issues.

Steve

This topic was automatically closed after 9 days. New replies are no longer allowed.