Problem/Motivation

The built in module/theme update feature is great as it greatly decreases the amount of work and the time a site has to be down when updating a lot of modules.

A problem though is that it doesn't take into account which version of a project you are using and can easily end up downgrading a modules, which in turn can lead to the website breaking.

When opening the Update page you get a list of all items for which there are updates available. This list seems to be based on "Recommended version" and it only lists one item per project.

Thus if your installation is using a dev version, but there is an older recommended version, then you can't use this feature because the dev version is not possible to select.

Also, the page is not showing dates, so you really need to have the Available Updates page open as well and switch back and fourth between them.

This feature needs to be smarter and realise that if the installed version is a dev version that is newer than the recommended version, then it is very likely the dev version it should update to.

For experienced users it is not a problem to make sure the correct modules are updated and then manually do the ones that would have been downgraded. Not so experienced user are bound to run into problems with this though.

Proposed resolution

In these cases there should be two options, using radio buttons, so it is easy to select which version to update to for individual projects.

When clicking the "select all" checkmark, it should also default to the newer dev version (if the installed is a dev version newer than the recommended).

These multiple choice updates should also be easily to spot in the list, either by its own colour or grouped together at the top of the list.

Then when clicking Download it should be smart enough to detect any accidental downgrades and ask me if I really want that. On the same screen I should be able to change the choice for those modules detected to be downgraded.

Remaining tasks

  • Come to a consensus on the UI, proposed solutions:
    • Use radios for upgrading dev versions to give the user the option of selecting between dev and stable
    • Different colors or some other differentiation for dev versions OR
    • Group dev versions apart from stable releases
  • Write/fix patch for D7
  • Write patch for D8

Comments

int’s picture

Version: 7.0-alpha6 » 7.x-dev
int’s picture

Priority: Normal » Major
tsvenson’s picture

Issue tags: +Update manager

Just setting the issue tag correctly.

Anonymous’s picture

Title: Update will happily downgrade modules unless your careful » Update will happily downgrade modules unless you are careful
Issue tags: -Update manager

I am fixing the title, and removing the tag that is duplicating the content of the component field (and subscribing).

rschwab’s picture

Version: 7.x-dev » 8.x-dev

bummer.

dww’s picture

Issue tags: +Update manager

Note: the Update manager tag doesn't duplicate the component. There are parts of the Update manager (e.g. authorize.php) that aren't in update.module, and there are parts of update.module that aren't the Update manager.

dww’s picture

Priority: Major » Normal
Issue tags: +Update manager dev

Furthermore, I'm going to open a new tag for "Update manager dev" for all the issues dealing with shortcomings in how the Update manager handles -dev releases. ;)

Anonymous’s picture

Will not this issue be fixed before Drupal 7 is out?

dww’s picture

Not unless someone writes a patch, and soon...

Anonymous’s picture

That makes sense.
I was just wondering about the version set for this report; I took it was already decided that this issue would be fixed for Drupal 8.

tsvenson’s picture

Just noticed it was bumped to 8.x as well without a proper explanation to why. Since @int made it a major issue in #2 it would be interesting if @rschwab could elaborate on why he pushed it to Drupal 8 in #5?

Personally I see this as a big problem for the update manager, especially as its going to take some time before modules are in official stable versions for Drupal 7. Lots of users are going to get downgraded using unless they are really careful when updating.

Anonymous’s picture

Version: 8.x-dev » 7.x-dev

Let's move it back to Drupal 7. If users will see it is set for Drupal 8, they will think there are no plans to resolve the issue for Drupal 7, and they will not try to make a patch to resolve the problem.

rschwab’s picture

Sorry I thought it was an API freeze issue.

brianV’s picture

To correct #14, that issue was marked as a duplicate of this one. This one is (and should be) still open!

bfroehle’s picture

Status: Active » Needs review
StatusFileSize
new2.26 KB
new1.23 KB

Two suggested patches. Both work by comparing the timestamp of the installed -dev release with with the date of the recommended version.

One just hides the entry all together from the upgrade list, another puts the module in the "update manually" table.

But there there are lots of questions here, like:
- Should we instead suggest that the user upgrades to the newest dev version?
- Do we hide the release if they are running the newest dev version?
- Do we run this downgrade check for all releases? Or just -dev releases?

Status: Needs review » Needs work

The last submitted patch, 850846-display-dev-downgrades-in-the-manual-update-r.patch, failed testing.

tsvenson’s picture

- Should we instead suggest that the user upgrades to the newest dev version?

A user that has installed a dev release that has a newer date did that for a reason and unless there is a newer recommended release a newer dev release should be suggested. In the case where there exist both a new official and a dev release it should be a choice (radio buttons) for the user.

- Do we hide the release if they are running the newest dev version?

If the recommended release is older than the dev release the user is running, it should be hidden. That way it is reflecting how the Available Updates page is listing it in green.

- Do we run this downgrade check for all releases? Or just -dev releases?

I think it should since it is possible that a release is withdrawn due to severe problems discovered after the release, thus an older version is again the recommended. There should be some sort of highlighting for this though.

I also think there should be highlighting standards for dev releases as well. Then it will be very easy to spot which projects are dev releases and which are official releases. If its possible to distinguish dev, alpha, beta, RC and official it would be good if they could have different highlighting.

fietserwin’s picture

+1 (#11 states it correctly: many modules will stay in dev for a long time to come. Moreover, looking at D6 modules, many never get out of dev, alpha or beta...).

I will review and test as soon as a new patch is proposed.

fietserwin’s picture

I tried to add something as suggested in #18, but adding radio buttons in a cell in a tableselect is not something that was foreseen by FAPI. So, unless you add the complete markup yourself to that cell this is a no go.

Another solution I'm currently thinking about is to present a separate table with available dev versions.

- Add header to the table for recommended releases.
- Do not show older recommended versions (current patch).
- Show a new table with available dev releases.
- Only if current install is already dev (to be decided).
- Only if available dev is newer than current install.
- User might select multiple releases for the same project. So additional validation is needed.

Pro's:
- Dev versions are clearly separated from the rest, better than with radios.
- Table for recommended stays the same, no difficult mark-up for radio buttons and subsequent handling of that
- Would allow to present dev version, even when the current install is a normal release. The clean separation will assure that the dev version is not selected by accident.

To be decided for this solution:
- tables for dev-enabled and dev-disabled like now with the recommended tables? (I would say yes)
- present dev versions for normal current installs? (I would say yes, this allows one to install a fix)
- add dates to the information? (for me, the release dates of the available versions - or more specific the difference between them - is an important attribute in selecting between dev and recommended. Especially as currently for many modules new releases are appearing almost weekly.

I will see if I can create a patch for this way (UI part first, so we see what we're talking about).

fietserwin’s picture

StatusFileSize
new11.8 KB

Please find attached a UI only patch. Don't select the presented dev versions, it won't work. With this patch, I want to know if this is the way to go. If we can agree on the UI, we can continue on implementing the behaviour.

bfroehle’s picture

Status: Needs work » Needs review

Setting to needs review to trigger the testbot.

bryancasler’s picture

glad to see resolving this issue is already in progress, subscribe

fietserwin’s picture

StatusFileSize
new12.94 KB

Improved patch, that removes the "Undefined variable: dev_entry"that leads to failed tests. for the rest, nothing really changed, still waiting for your reactions and ideas on the UI. (note: AFAIC, this patch needs not be tested by the testbot, it is not functional, it is UI only)

brianV’s picture

I'm not familiar enough with the update system to provide a real in-depth review, but the two items caught me eye:

+++ modules/update/update.manager.inc	Wed Mar 02 14:51:33 2011
@@ -93,105 +93,138 @@
+      $recommended_entry = array(
+        // The project name to display can vary based on the info we have.
+      	'title' => $title,
+      	'installed_version' => $installed_version,
+        'available_version' => $recommended_version,
+      );

Whitespace / incorrect indentation. The 'title' and 'installed_version' lines are indented by tabs instead of spaces.

+++ modules/update/update.manager.inc	Wed Mar 02 14:51:33 2011
@@ -93,105 +93,138 @@
+      $dev_entry = array(
+        // The project name to display can vary based on the info we have.
+      	'title' => $title,
+      	'installed_version' => $installed_version,
+        'available_version' => $dev_version,
+        '#attributes' => array('class' => array('update-dev')),
+      );

Same as above - The 'title' and 'installed_version' lines are indented by tabs instead of spaces.

Powered by Dreditor.

enxox’s picture

please can someone post a patched version of the module?

bfroehle’s picture

Status: Needs review » Needs work

Needs work per #25.

Andrew Schulman’s picture

Subscribing

rootwork’s picture

Priority: Normal » Major

Subscribing. This seems like a big deal -- since a lot of Drupal modules don't yet have stable D7 versions yet, a lot of client sites are ending up with a dev that patches some issues since the last beta-whatever. (Normally I wouldn't hand off a site to a client with dev versions except in extraordinary circumstances.)

The UI suggested in the above patch seems fine to me, but it was noted that this is just the front-end, and it's not functional yet. I also don't know enough about the updating system to be able to figure out how to make it functional, but I will cheerfully test anything anyone else posts...

rootwork’s picture

Version: 7.x-dev » 7.4
marcingy’s picture

Version: 7.4 » 7.x-dev
Priority: Major » Normal

This is not major there are work arounds use ftp, drush etc

marcingy’s picture

This is not major there are work arounds use ftp, drush etc

tsvenson’s picture

Version: 7.x-dev » 8.x-dev

Moved to Drupal 8.x

rootwork’s picture

Version: 8.x-dev » 7.4
Priority: Normal » Major

I disagree. For average Drupal users, they get an error message saying they need to update. When they update, their modules are downgraded. That's serious.

To me, that's a major issue, it affects 7.x, and it needs to be addressed. I can't believe there's consensus among core developers that this bug is just going to go unfixed until the next major version.

If you can provide evidence that core developers have determined this is going to be ignored, then I'll defer to their decision.

marcingy’s picture

Version: 7.4 » 8.x-dev

Things are fixed in head first. There is no such thing as a core developer, core development is everyone that is involved. And it being normal does not mean it is ignored it simply means that it is not something that is preventing drupal from being used.

marcingy’s picture

Issue tags: +Needs backport to D7

Adding backport tag

rschwab’s picture

@Rootwork please see #1050616: Figure out backport workflow from Drupal 8 to Drupal 7. It will give you (probably way too much) background information on why the process exists as it does.

rootwork’s picture

OK. Thanks for adding the backport tag. I disagree that there aren't core developers -- the big ones are listed right here. Sure, there's no title called "core developer" but there are clearly people whose voice carries more weight because of their long involvement in Drupal core development. It was those people of whom I was speaking.

But with the backport tag on there, I can understand wanting to fix it in head first, so that seems fine.

marcingy’s picture

No they are core maintainers and they don't chime in on every issue. Plus given that the maintainer of this feature set it to normal (dww) I think that someone with knowledge on the area has already spoken.

giorgosk’s picture

subscribing
I always fall for the suggestion to upgrade
but instead I get my modules downgraded with serious problems

aspilicious’s picture

Bumping this again so it's on top the update.module list... (so it's easier to track)

xjm’s picture

We should be able to fix this more easily now that we have versioned dev builds.

fietserwin’s picture

You are right. We should first fix this then add the option to update to a dev version in a separate issue. My ideas back then are to far reaching. The patch of #16 might be a good starting point to post an up to date patch.

What does drive me crazy, is that no publication dates are shown. It probably does make the UI a bit cleaner, but I do use that information. Though that may be because of this bug...

bago’s picture

@marcingy This is not major there are work arounds use ftp, drush etc

Can you provide more informations? Do ftp and drush correctly update the right modules and avoid downgrading dev modules to the previous stable?

Now that we have versioned devs it makes even less sense that Drupal propose to upgrade 7.x-1.0-beta1+7-dev with 7.x-1.0-beta1. It just needs a check on the name (and no other metadata) to understand that the -dev one is 7 commits ahead than the proposed stable.

I wish update.module was an external module, so it would not have this very long workflow to be fixed.

tsvenson’s picture

@bago: You have to be careful with Drush too as tt actually uses a lot of the functionality from the update module. I have seen cases were it downgrades modules when using "drush up"

The solution then is to use "drush dl --select [module]" + "drush updatedb" to make sure it updates to the wanted version.

If the site has tons of modules there is a risk with this as its not always so easy to spot these things in the huge table "drush up" spits out.

Also, as mentioned, the update manager may show one version in the list that it says it will update to, but then when performing the update it actually takes another. In these cases its I believe it takes the recommended and if that is older then it will in fact downgrade.

dww’s picture

Well, it's not really easier to fix this with versioned dev releases, since neither Update manager nor drush knows anything about them. They're not included anywhere in the release history XML feeds. For example http://updates.drupal.org/release-history/views/7.x and search for "7.x-3.x-dev" and look around. You won't see the fancy "rebuild_version" stuff anywhere in there. See #1314180: Make dev release numbers useful for more. That was going to be a huge can of worms and chx, moshe and myself decided it was easier not to untangle that mess at the same time.

I continue to believe the best solution here isn't a technical one to try to make our tools more friendly with -dev releases, but a cultural one to make project maintainers more likely to create official releases. -dev always sucks for everyone, and people shouldn't have to depend on -dev releases unless they're actually developers. But, I know that's basically fantasy, and given that -dev is ubiquitous, we should attempt to properly support it (as much as that pains me to say).

I'm just a subsystem maintainer, so while my opinion counts for more than many people, ultimately it's up to the actual core committers to decide if this is going to be committed to a given branch. However, for that to happen, someone needs to write a working patch. So, I'd try to fix this in D8 first and then see how far-reaching the changes are and if a D7 backport is feasible.

Note also that we've got https://drupal.org/project/update_test_module and I'd be happy to create some D8 test releases there if folks want to use that for testing this bug on D8.

tsvenson’s picture

@dww:

I continue to believe the best solution here isn't a technical one to try to make our tools more friendly with -dev releases, but a cultural one to make project maintainers more likely to create official releases.

Totally agree with you about that. Especially when considering that even the simplest sites requires 10's of modules, while other easily break 100. Then a lot of work goes into updating, plus of course the testing required on a non production version of the site.

kingfisher64’s picture

Bump.

Given various comments on this issue, especially #18, #20 and #29 and #46 has the route to fix this issue been decided upon?

#46

I continue to believe the best solution here isn't a technical one to try to make our tools more friendly with -dev releases, but a cultural one to make project maintainers more likely to create official releases. -dev always sucks for everyone, and people shouldn't have to depend on -dev releases unless they're actually developers. But, I know that's basically fantasy, and given that -dev is ubiquitous, we should attempt to properly support it.

It sounds like the simplist solution is to just get the module maintainers to release regular stable versions rather than to commit single patches to dev but given the end of that statement it doesn't sound like you think dww that this is plausable or likely.

Alternatively is anything to be done with the patches that fietserwin submitted then?

Just trying to get this conversation going again. :)

dww’s picture

Yes, I think the proposed cultural "solution" isn't going to happen (at least not universally), so we should fix the update manager. AFAICT, the patches from fietserwin are non-functional, and just UI changes. I haven't reviewed or tested. But, from what I can tell, we have an understanding of the bug, an agreement on the need to fix it, but no working patches for any branches. So, if anyone's interested in re-rolling and starting to get this working, please do! Sadly, I don't have nearly enough time for all the responsibilities I've taken on, have been doing a terrible job as a subsystem maintainer for the update manager, and can't take this patch on myself right now.

Thanks/sorry,
-Derek

fietserwin’s picture

#49: You are right my patches were only UI related and not functional. At that time I was, incorrectly, trying to push also some new features into this issue. So, IM(current)O, a patch for this issue should:

  • Prevent that a dev version gets overwritten by an older "official" release.
  • Add some release date information when a dev version is advised to be overwritten by an official release. this as people won't trust this screen anymore now that this bug has been around for so long.

And thus should not:

  • Allow to upgrade from an official release to a dev release (to install a patch).
  • Allow to upgrade from a dev release to a newer dev release (to install yet another patch).

How nice these features would be, they should not be part of this issue. Perhaps there are already other issues for these features. If not, they could be created as follow ups. Looking through the comments, there will be support for it from others.

I think that the first patch of #16 comes closest to what we need to solve just this issue. Probably needs to be rerolled, will need tests; and (IMO) the date information.

dcam’s picture

http://drupal.org/node/1427826 contains instructions for updating the issue summary with the summary template.

The summary may need to be updated with information from comments.

martin107’s picture

Issue tags: +Needs reroll

Patch no longer applies.

alansaviolobo’s picture

Status: Needs work » Needs review
StatusFileSize
new11.56 KB
new24.42 KB

re-rolled the patch

Status: Needs review » Needs work

The last submitted patch, 53: update_will_happily-850846-53.patch, failed testing.

sutharsan’s picture

Issue tags: -Needs reroll

Removing 'Needs reroll' tag because this issue just needs work, not a reroll. Older patches don't apply because the form moved to the UpdateManagerUpdate controller class.

The #53 is no straight patch of any of the previous patches. It has some similarities with #24, but missing portions of its code. Unless @alansaviolobo can explain what he did and why, I would recommend to ignore the #53 patch.

highermath’s picture

Reviewing this in the DC Asia code sprint, I could not find a module with the right set of releases to demonstrate that the issue still exists. Of course, this does not mean that it does not exist.

If anyone can detail how to reproduce this issue in D8, that would be helpful.

hass’s picture

Just install a DEV release of a module that has an older official release.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

mattshoaf’s picture

Issue summary: View changes
Issue tags: +Triaged core major

Was reviewed as part of Triage at DrupalCon Baltimore2017, this is still an issue so I updated the Issue Summary to use the current template standards.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nwom’s picture

It would be great if this could be re-rolled in D9, since this issue still exists after 12 years.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dww’s picture

Status: Needs work » Closed (outdated)
Issue tags: +Bug Smash Initiative

Decided to deprecate all the plumbing and remove the UI in 11.2.x. Closing this as outdated.

xjm’s picture

Status: Closed (outdated) » Closed (won't fix)

I've never been so happy to see a terrible bug be closed without being fixed.

xjm’s picture

Status: Closed (won't fix) » Closed (outdated)

Well, let's stick with "outdated" so that people don't go "what are they thinking?!".