Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OJS 3.4 (multiple versions): plugins showing "Can be upgraded" in gallery when no newer version exists #10440

Closed
tmrozewski-york opened this issue Sep 18, 2024 · 11 comments

Comments

@tmrozewski-york
Copy link

After upgrading from OJS 3.4.0.5 to 3.4.0.7, multiple plugins show "Can be upgraded" in the plugin gallery; however, no newer plugin is available.

For example, the QuickSubmit plugin shows "Can be upgraded" even though we are running v1.0.7.2 released on 2024-04-12, which is the most recent version available in GitHub. If I click "Upgrade" for the plugin in the gallery, I get an error message saying "Plugin already installed, and is newer than the version available in the gallery." The plugin then continues to show "Can be upgraded" in the gallery.

This is currently happening on our only two journals running 3.4. We upgraded both from 3.4.0.5 to 7 at the same time. We encountered a similar issue with both journals when we upgraded from 3.4.0.4 to 3.4.0.5.

This issue appears which each installed plugin on both journals except ORCiD Profile.

@kaitlinnewson
Copy link
Member

kaitlinnewson commented Sep 20, 2024

Hi @tmrozewski-york, this might be caused by a discrepancy between what is in the database and the version of the plugin code. Can you check your versions table in the database and check the version for one of the plugins showing the error, e.g. QuickSubmit? This query should work for that plugin:

SELECT * FROM versions WHERE product = 'quickSubmit';

@tmrozewski-york
Copy link
Author

Hi @kaitlinnewson my IT support provided me with this:

mysql> select * from versions where product ='quickSubmit'; +------------+-------+-------+----------+-------+---------------------+---------+----------------------+-------------+--------------------+-----------+----------+ | version_id | major | minor | revision | build | date_installed | current | product_type | product | product_class_name | lazy_load | sitewide | +------------+-------+-------+----------+-------+---------------------+---------+----------------------+-------------+--------------------+-----------+----------+ | 47 | 1 | 0 | 7 | 1 | 2023-09-22 15:57:41 | 0 | plugins.importexport | quickSubmit | | 0 | 0 | | 67 | 1 | 0 | 7 | 2 | 2024-07-04 17:09:21 | 1 | plugins.importexport | quickSubmit | | 0 | 0 | +------------+-------+-------+----------+-------+---------------------+---------+----------------------+-------------+--------------------+-----------+----------+ 2 rows in set (0.00 sec)

@kaitlinnewson
Copy link
Member

Thanks @tmrozewski-york, things look alright in your database. Can you also confirm that the plugin files are present on the server? You can either try using the plugin and see if it's working and appearing for you in the UI, or ask your IT support to check in the file system with something like ls plugins/importexport/quickSubmit/.

@tmrozewski-york
Copy link
Author

@kaitlinnewson my IT says there are not plugin files for quickSubmit

@kaitlinnewson
Copy link
Member

@tmrozewski-york Can you try installing the plugin with the "Upload a New Plugin" functionality and see if that does the trick to replace those files on the server? You can download the release package for QuickSubmit on GitHub for your version here (the .tar.gz file). Alternatively, you could unpackage the release directly onto the server in plugins/importexport/quickSubmit/.

@tmrozewski-york
Copy link
Author

@kaitlinnewson manually installing it with the tar.gz worked (it had worked when we were running 3.4.0.5 as well). Anyway what's causing this to happen?

@kaitlinnewson
Copy link
Member

@tmrozewski-york Currently the "can be upgraded" message is shown when either the version in the database is older than what's in the plugin gallery plugins.xml, or when the files on the server are missing. This messaging could be improved in the second case (which is what was happening in your QuickSubmit plugin), perhaps to show a message about "missing plugin files" instead.

Previously there was a workaround where clicking the "upgrade" button would download the files again, but it looks like this was changed here. @jonasraoni what do you think about reverting the change in this line?

As for why the plugin files are missing, that would take some more investigating. Are you doing anything with plugins during the upgrade process?

@tmrozewski-york
Copy link
Author

As for why the plugin files are missing, that would take some more investigating. Are you doing anything with plugins during the upgrade process?

I'm not sure about the upgrade script we're using in-house. I'll speak with the team here about it. Any suggestions about where we should be looking or what we should look for?

@kaitlinnewson
Copy link
Member

@tmrozewski-york I'd take a look at anything related to plugins in your script to start - for instance, is there a point where plugin files are being deleted, moved, or not carried over into the upgraded install in some way?

@asmecher
Copy link
Member

As for why the plugin files are missing, that would take some more investigating.

I suspect the plugin files are not being brought across during upgrade, which is the correct outcome of the upgrade process. When upgrading from 3.3.x to 3.4.x, for example, the 3.3.x plugin files should not be copied across into the 3.4.x directory tree.

@tmrozewski-york
Copy link
Author

@asmecher you nailed it - turns out we'd adapted the 3.4.x.x. script from the 3.3 > 3.4 script and not from the 3.3.x.x upgrade script. Thanks for the lead, and sorry to mobilize you both for this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants