Even after the fix in #834848: Warning message regarding hook_update_last_removed() is not displayed is applied, there is still a situation where error messages can be generated, and not displayed: If there are modules that haven't set their schema version properly, a message is generated but not displayed *unless there is ALSO a schema update that needs to be applied*.

The message is something like

uc_cart module
uc_cart module can not be updated. Its schema version is 0. Updates up to and including 6202 have been removed in this release. In order to update uc_cart module, you will first need to upgrade to the last version in which these updates were available.

but there is code towards the bottom of update_script_selection_form() that does

  if (empty($count)) {
    drupal_set_message(t('No pending updates.'));
    unset($form);
    $form['links'] = array(
      '#markup' => theme('item_list', array('items' => update_helpful_links())),
    );
  }

which destroys $form when $count=0.

Comments

lyricnz’s picture

Status: Active » Needs review
StatusFileSize
new630 bytes

Here's a patch. It also needs to stop the fieldset collapsing, as this doesn't appear to work properly with just 'item' elements within it.

Starminder’s picture

subscribe

lyricnz’s picture

Bump. This bug is happening when people update Ubercart to D7.

catch’s picture

Version: 7.x-dev » 8.x-dev
Status: Needs review » Needs work
Issue tags: +Needs backport to D7

The fieldset issue was supposed to be fixed by #676800: Fieldsets break design badly I thought. If that's still broken, then we should re-open it or open a new issue or something - since the patch is adding a workaround it would be good to reference the issue in a @todo explicitly.

I tried to figure out other ways to display the message in irc with lyricnz, but there it is already in the form in a specific location, just hidden by the bug, then fixing the bug exposes other bugs with fieldsets, so I'm not sure we can load all of that on this patch otherwise.

catch’s picture

#152431: collapsible fieldset problems with #prefix, #suffix, markup rendering is re-opened, apart from linking to that I'm not sure what else can be done here.

lyricnz’s picture

Updated patch to only show the "No pending updates." message in happy-days scenario. Updated comment about the kludge around collapsed fieldsets.

To deliberately reproduce the symptom:

update system set schema_version=0 where name='system';

Here's a screenshot of the post-patch output.

lyricnz’s picture

StatusFileSize
new709 bytes
catch’s picture

Status: Needs work » Needs review
StatusFileSize
new1.63 KB
new963 bytes

Added a test.

deepbluesolutions’s picture

this patch worked for me, identified the module which was causing my problems on upgrade.

before patch only given message:
Some of the pending updates cannot be applied because their dependencies were not met.

after patch additional message shown:
vars module vars module can not be updated. Its schema version is 7102. Updates up to and including 7103 have been removed in this release. In order to update vars module, you will first need to upgrade to the last version in which these updates were available.

+1 for this patch

Vandalf’s picture

Oh, Catch! I love you! You fixed my site for me! :)
I owe you a cold one for this! Thanks a ton!

fonant’s picture

The patch in #8 provides useful information for me too.

lyricnz’s picture

StatusFileSize
new1.67 KB

Reroll for D8 changes.

mstrelan’s picture

Status: Needs review » Needs work

I don't think this is good enough. It works fine if the only pending update you have is incompatible. If you have a compatible pending update and an incompatible update, the incompatibility warning is collapsed within the fieldset. I imagine a fair few people don't bother expanding that fieldset, so will never see it. We could move the collapsed = FALSE to outside of the if (empty($count)) but then you may get a giant fieldset.

What I ask is what is wrong with just including the module incompatibility message in the drupal_set_message() that is used to say "Some of the pending updates cannot be applied because their dependencies were not met."?

lunk rat’s picture

+1 for patch in #8. I have the same experience described in #9. Helped me out a lot!

mgifford’s picture

Status: Needs work » Needs review
Issue tags: -Needs backport to D7

#12: update-messages-hidden.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

The last submitted patch, update-messages-hidden.patch, failed testing.

mgifford’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

Re-roll. This seems like a nice enhancement.

The last submitted patch, update-messages-hidden-1159160-17.patch, failed testing.

mvc’s picture

mgifford’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Needs work » Needs review

We can test this in D7 and then bring it back up to D8.

mvc’s picture

Version: 7.x-dev » 8.0.x-dev
Status: Needs review » Needs work

mgifford, this bug exists in d8 and should be fixed first there, imho. all the usability comments above apply equally to both branches, so this patch still needs more work, testing, and UX fixes. i just created the backport so that i could reference this temporary solution in a drush makefile. i would tag it for d7 iff it's fixed for d8.

nice to know the testbot is happy with it, though :)

mgifford’s picture

StatusFileSize
new1.97 KB

Thanks @mvc - I had meant to switch it back to D8 after the bot was happy with it.

What happened to core/update.php? It almost looks like it is here:
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Query!Up...

Nope....

But thanks to grep, I think I've successfully re-rolled this patch.

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.

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.

cestmoi’s picture

I used only the first part of the patch for my drupal 8.6.1 and it helped me know which module was causing the "Some of the pending updates cannot be applied because their dependencies were not met" warning on update.php . I was puzzled by that warning and the patch helped me fix it. Thank you.
I wonder why this is not a core feature so our life is easier trying to troubleshoot drupal !

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.

lendude’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Bug Smash Initiative, +Needs steps to reproduce

Discussed this a bit with @catch in #bugsmash.

We couldn't find any way to reproduce this anymore. We tried with setting hook_update_last_removed and adding an update, but this means all updates are blocked on a message 'UNSUPPORTED SCHEMA VERSION: MODULE_NAME'. The same goes for the test that @catch added, that won't see the 'continue' button anymore so the next step will never be shown.

So I'm going to mark this postponed to see if somebody can come up with some steps to reproduce. We may set this to 'closed' if nobody can reproduce this anymore.

quietone’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Five months ago the discussion in bugsmash was not able to find a way to reproduce this problem and there has been no further comment that provides steps to reproduce.

Therefor, closing as outdated

Thanks to everyone who worked on this to improve Drupal!