Plugins re-installation after an upgrade

Hello there,

I have a quick question but I cannot find it anywhere in the forum. Do I have to re-install (download) plugins after a successful upgrade?

I have successfully upgraded from OJS 3.1.2-4 to 3.2.1-4. But the some plugins seems to be missing, because of this I can not know for certain if plugins should have been downloaded by the upgrade script and if not what the best way to resolve it?

Thank you and best regards,

Dung.

Hi @dung

Short answer: yes.
You do need upgrade or reinstall plugins after OJS upgrade.
The reason is that plugins have different versions that are compatible with OJS different versions. It applies to block plugin and themes.

If you upgrade using git you can upgrade your plugins by plugin gallery. If you can’t see the option to upgrade your plugins, you will need to clone/download them from their original repo and follow the instructions to create a correct tarball (name folder) and upload them using the Install plugin feature.

Best,
Israel Cefrin
PKP Team

Hello @israel.cefrin

First of all thank you for a quick response. I have 2 follow up questions:

  1. what is “block plugin” interested to learn the terminology. Most of the plugins I have been working with are in /var/www/html/ojs-3.2.1-4/plugins/themes and /var/www/html/ojs-3.2.1-4/plugins/generic ?

  2. I did not upgrade using git. I downloaded the new version and ran script - “php tools/upgrade.php upgrade” linux command line. So can I just download the plugin tar file and extract it into /var/www/html/ojs-3.2.1-4/plugins/generic ?

Best regards,

Dung.

If you get the official tarball from the pkp website, and you uncompress it “over” your existing 3.1.2 (overwriting your existing files), most of your plugins will be updated to the ones included in the release.

To make it clear:

  • The tarball release don’t include all the plugins, only the ones maintained by PKP.
  • This plugins where updated in the date of the release, so you will find some of them will need to be updated (because since the release till now, new versions appear).

If you make a git installation, you get the last release of each plugin, in the moment you install/upgrade.

So, if you do a tarball upgrade, you can unzip and then manually update the plugins or… use this jewel @ctgraham released yesterday:

Cheers,
m.

Good Morning @marc

This Plugin shim looks like a great automation, I will try it out and report back. Thank you for your time. I appreciate the explanation.

Best,

Dung.

Hi @dung

what is “block plugin” interested to learn the terminology.

A block plugin is usually all those when enabled will be present some information in the sidebar, i.e.: twitter, mostRead, etc…

Regarding your second question, I think @marc has addressed it.

Best,
Israel Cefrin
PKP Team

1 Like

Hello @israel.cefrin

Thank you for the explanation, and yes I am working on @marc 's suggestion then report the result.

Regards,

Dung.

Hello @marc ,

I got this error “Could not open input file: lib/pkp/tools/pluginGallery.php” after running command “sudo -u apache php lib/pkp/tools/pluginGallery.php help” - Where should I find pluginGallery.php script? Thank you so much for your time.

image

Best regards,

Dung.

Hi, @dung . The pluginGallery.php script is not yet incorporated in the distributed package of OJS, but you can download a copy here before it is formally packaged there:

1 Like

Hello @ctgraham ,

So I :

I got some (one) errors as seen below:

Install plugin version tool
Usage: lib/pkp/tools/installPluginVersion.php path/to/version.xml
plugins/importexport/portico
PHP Parse error: syntax error, unexpected ‘)’ in /var/www/html/ojs-3.2.1-4/plugins/importexport/portico/PorticoExportPlugin.inc.php on line 155
plugins/generic/ror

Install plugin version tool
Usage: lib/pkp/tools/installPluginVersion.php path/to/version.xml
plugins/generic/browseBySection
PHP Parse error: syntax error, unexpected ‘)’ in /var/www/html/ojs-3.2.1-4/plugins/importexport/portico/PorticoExportPlugin.inc.php on line 155
plugins/reports/scieloSubmissionsReport
PHP Parse error: syntax error, unexpected ‘)’ in /var/www/html/ojs-3.2.1-4/plugins/importexport/portico/PorticoExportPlugin.inc.php on line 155

image

I am not sure what to do, can you point me.

Regards,

Dung.

Hi again @ctgraham ,

for the second method " Or, upgrade all plugins: " A PKP plugin shim for the CLI · GitHub

I got the same error:

image

Thank you for your time.

Dung.

The Portico plugin reports that it is compatible with OJS 3.2, but it is only compatible with OJS 3.2 and PHP 7.3. You can remove the files under “plugins/importexport/portico”, or you can upgrade to PHP 7.3.

Thank you @ctgraham ,

Automated script went without error following your instruction, can I please ask you one last question. I read “Background” here A PKP plugin shim for the CLI · GitHub - but I still do not entirely understand what the script does to all plugins.

Best regards,

Dung.

Hi @ctgraham ,

The reason I asked previous question was because even the plugins re-installation script successfully ran, but our OJS still has missed out 2 plugins OpenAIRE and SWORD (Some of the plugins were added and reinstalled as expected). I re-ran the script second time and same result, these 2 plugins were there before the upgrade so we expect that they will be reinstalled by the script.

Or should I manually reinstall these 2 plugins?

Thank you for your time.

Dung.

The script pluginGallery.php looks at the Plugin Gallery for your version of OJS, and lists the latest version of each plugin marked as compatible with that version.

The first bash script under " Install the latest version of all missing plugins" selects only those plugins marked with the status of “noInstalledVersion” (not installed) and then:

  • clears the existing plugin folder (if any)
  • downloads the latest version to /tmp
  • extracts the download from /tmp to the plugin folder
  • runs the plugin installation script

Similarly, the bash script for “upgrade all plugins” selects only those plugins marked with the status of “installedVersionOlder” (update is available) and then:

  • clears the existing plugin folder
  • downloads the latest version to /tmp
  • extracts the download from /tmp to the plugin folder
  • runs the software upgrade script

In my testing, I found that some of the permissions in the tar files weren’t suitable for my hosting default (dedicated apache user with mod_php under RHEL, where apache cannot write to the php files). Specifically, the tar files were packaged with permissions for the user, but not for the group or world. As a result, when I untar’d the plugin as myself, and then ran the install/upgrade as apache, the apache user could not read the new plugin files. I had to change the permissions to allow apache to read the plugin files.

This may be the case with your missed plugins, but will depend on numerous factors specific to your server environment.

Hello @marc ,

How do we find out what plugins are maintained by PKP for example SWORD and OPENAIRE plugins?

Thank you!

Dung.

Hello again @marc ,

I found out that SWORD created by PKP and OPENAIRE created by The Federation of Finnish Learned Societies (https://tsv.fi) with funding provided by the Deutsche Forschungsgemeinschaft and Freie Universität Berlin/CeDiS.

This explained why @ctgraham 's script upgraded/installed SWORD but did not upgraded/installed OPENAIRE.

I got all the answers I need to understand about plugins. Please close this ticket and thank you everyone has helped me with this.

Best regards,

Dung.

image

image

1 Like

This is the list that I suspect Clinton’s script gets:
http://pkp.sfu.ca/ojs/xml/plugins.xml

Happy you found the authorship information by your own. :wink:

Cheers,
m.

1 Like