pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
306 stars 445 forks source link

Upgrading to 3.4 from 3.3 can leave a site inaccessible if the updated theme is not present first #9794

Open jnugent opened 8 months ago

jnugent commented 8 months ago

Describe the bug Normally, themes are upgraded via the plugin gallery, which provides the link to the current compatible version. However, if an installation is using a theme from the gallery, they cannot update it through the gallery until after the upgrade. This means that the frontend will be inaccessible immediately after the upgrade. They also will not be able to load the Website Settings -> Plugins area if the old 3.3 theme is still presnt on disk, since it is not compatible with 3.4. A fatal error occurs.

A JM must then delete the old theme directory on disk, and manually set the theme in the database to default in order to be able to proceed.

To Reproduce Steps to reproduce the behavior:

  1. Begin with a 3.3 install using a PKP theme like bootstrap, health sciences, etc
  2. Upgrade to 3.4. The old theme is not caught by the pre-flight checks.
  3. Attempt to load the front end, or the website settings area.
  4. See error

What application are you using? OJS 3.4

jonasraoni commented 8 months ago

Considering that the documentations indicates the user to drop non-native plugins, even the ones from the plugin gallery, before upgrading (which is a good advice), I'll address this by attempting to load the default theme.