Installed Plugins failes to complete loading because of obsolete plugin version. Feedback to user or logging of this error is much appreciated

Hello,

I encountered this issue when developing own themes (theme plugins) for our journals on OJS3.2.1-2.
I could not understand why the list of installed plugins in Settings > Website > Plugins > Installed Plugins would not finish loading.

There was nothing being logged to the error logs, nor any messages in the administration interface.

After some time I remembered that this can occur when trying to install an old plugin (with a version number lower than what is already registered in the OJS database).

This was indeed the case, as the theme I am making was a remake of a previous theme with the same name, but the new theme had a version of 1.0.0.0 wile the old theme had something like 3.1.0.12, so after giving the new theme a proper version number that is higher than the old theme, Installed Plugins now completes loading and I can use the theme.

It would be good if there could be output to error logs or in the administration interface about plugin version downgrade, or a way for the interface to recover even if there was an obsolete plugin there, or atleast provide a warning.

Best,
Eirik Hanssen
OsloMet University Library

Hi @Eirik_Hanssen,

Can you describe in more detail how the problem can be reproduced?
I’ve tried the following:

  • Installed Classic theme version 1.0.4.0
  • Tried to upgrade the plugin by pressing the correspondent button under the plugin tab with the older version (1.0.3.1) - received the message: Plugin already installed, and is newer than the version available in the gallery.
  • Tried to upgrade the plugin by uploading the older version as a new plugin - received the message: Plugin already exists, but is newer than the installed version. Please upgrade instead

Anyway, to reproduce the problem I experience with no message or logging of the fact that the theme plugin has a version that is too old, try to edit version.xml of a theme plugin
and set <release>x.x.x.x</release> to something that is lower.
Then try to visit the plugin gallery in OJS.
For me I just get a never ending loading loop in OJS with no error messages, and nothing is logged to the php log file.

I was also unable to reproduce this error following your instructions. I tried adding a syntax error to the theme plugin’s version.xml file, in case that was the problem, but still the plugin gallery loaded for me without a problem.

Tanks for looking into it even if you could not reproduce the issue.
Best,
Eirik Hanssen
OsloMet University Library