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

Projects installed by selecting an older version via the project installer cannot be updated via the UI #3997

Open
klonos opened this issue Aug 26, 2019 · 9 comments

Comments

@klonos
Copy link
Member

klonos commented Aug 26, 2019

Description of the bug
Projects installed via the project installer cannot be updated via the UI.

Steps To Reproduce
To reproduce the behavior:

  1. Start the installation of a module via the Project Browser.
  2. During the "Select versions" step, click on the "change release" link, and select to install an earlier version of the module, rather than the latest one.
  3. Install another module; also earlier version than the latest, but this time install it manually, by downloading and extracting the .zip file in the modules directory.
  4. Go to /admin/modules/update and try to update the modules as per usual...

Actual behavior
The update process finishes successfully, w/o any errors 👍 ...but when you check the "Available updates" page, only the module that was installed manually is updated; the module that was installed via the Project Installer is still in the older version 👎

Expected behavior
Modules installed via the Project Browser/Installer are updated to the latest version when updating via the admin UI.

Additional information
I have tested this with enabled/disabled projects; with modules/themes/layouts; with the site online vs in maintenance mode; selecting to update a single outdated module at a time, or multiple ones simultaneously. The outcome is that modules installed via the Project Installer are not updated.

@klonos
Copy link
Member Author

klonos commented Aug 26, 2019

I have tested this with:

  • webform 1.x-4.19.3 -> 1.x-4.20.0 (installed via the UI - update finishes w/o errors, but fails) 👎
  • backup_migrate 1.x-1.0.13 -> 1.x-1.0.14 (installed via the UI - update finishes w/o errors, but fails) 👎
  • rules 1.x-2.1.0 -> 1.x-2.1.1 (installed manually - updated successfully) 👍

@laryn
Copy link
Contributor

laryn commented Aug 26, 2019

I've tested updating via the Project Browser with some modules that were already installed on a dev site. I assume they were installed manually but can't recall for certain.

  • field_multiple_limit 1.x-1.0.3 -> 1.x-1.0.4 (successful)
  • job_scheduler 1.x-1.1.2 -> 1.x-1.1.3 (successful)

@klonos
Copy link
Member Author

klonos commented Aug 26, 2019

Trying to figure out what could possibly be different in installing manually vs via the admin UI. Could it be that the Project Installer does not set proper permissions when extracting the module files? ...and if so, then why aren't we picking that the update did not actually happen?

@indigoxela
Copy link
Member

I can confirm, there is a problem with updates, but it has nothing to do with permissions. File permissions are fine.

Backdrop does download the project and extracts it to tmp, but it downloads the outdated version again. Hence the old version gets replaced with the same old version.

Check your temporary folder for the update-extraction-XXXX dirs and check the .info files in there.

Either the way the most recent version url is constructed fails, or we maybe get fooled by the update cache. Flushing it didn't help, though. Neither does running cron.

I've been testing here with googleanalytics and webform.

@indigoxela
Copy link
Member

indigoxela commented Aug 27, 2019

I guess, it's related to the update_cache.

The full project download url gets saved to the database. Table "cache_update", column "data". These database entries have "expire" timestamps.

If I manually set such an expire timestamp to now in the database, then flush the cache (not sure about that), the update to the most recent version works.

@klonos
Copy link
Member Author

klonos commented Aug 27, 2019

Thanks for digging into this @indigoxela ...I intent to have a look too when I get a chance, but your investigation helps 👍

@klonos klonos added this to the 1.13.4 milestone Aug 29, 2019
@jenlampton jenlampton modified the milestones: 1.13.4, 1.14.1 Sep 16, 2019
@jenlampton jenlampton added this to High priority bugs in Bugs Oct 13, 2019
@jenlampton
Copy link
Member

Since this issue has a bug-fix milestone, but does not have a PR, that means it must be a high-prioroty bug, so I have added it to the Bugs Project, on the High Priority list. @klonos if you don't think it belongs there, please also remove the milestone :)

@jenlampton jenlampton modified the milestones: 1.14.1, 1.14.2 Oct 13, 2019
@klonos klonos modified the milestones: 1.14.2, 1.14.3 Dec 18, 2019
@jenlampton jenlampton modified the milestones: 1.14.3, 1.15.1 Jan 16, 2020
@jenlampton jenlampton modified the milestones: 1.15.1, 1.15.2 Mar 19, 2020
@jenlampton jenlampton modified the milestones: 1.15.2, 1.16.1, 1.16.2 May 15, 2020
@jenlampton jenlampton modified the milestones: 1.16.2, 1.16.3 Jun 17, 2020
@jenlampton jenlampton modified the milestones: 1.16.3, 1.17.1 Sep 15, 2020
@jenlampton jenlampton modified the milestones: 1.17.1, 1.17.2 Sep 30, 2020
@quicksketch quicksketch modified the milestones: 1.17.2, 1.17.3 Nov 8, 2020
@jenlampton jenlampton modified the milestones: 1.17.3, 1.17.4, 1.17.5 Nov 19, 2020
@ghost
Copy link

ghost commented Jan 8, 2021

Since this issue has a bug-fix milestone, but does not have a PR, that means it must be a high-prioroty bug

I don't see that criteria on https://backdropcms.org/user-guide/adding-milestones-to-issues... Does that page need updating to reflect this?

Based on the currently-documented criteria for bug-fix milestones, I don't see this issue as being eligible without a PR, so removing milestone.

@yorkshire-pudding
Copy link
Member

I have confirmed this odd behaviour while testing the PR for #3245:

  • Installing an older release via manual installation via the UI prevents it, with a silent fail, from updating
  • Installing by downloading the older release zip and unpacking into the modules folder fixes it

While it is rare for people to manually install the older release, it is possible through the UI and the fact that this silently fails is a problem. As this only happens if the older release is done (I've installed loads of modules through the UI, but always the recommended release), I'm going to change the title to reflect this.

@yorkshire-pudding yorkshire-pudding changed the title Projects installed via the project installer cannot be updated via the UI Projects installed by selecting an older version via the project installer cannot be updated via the UI Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Bugs
  
High priority bugs
Development

No branches or pull requests

6 participants