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
Comment #1
lyricnz commentedHere'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.
Comment #2
Starminder commentedsubscribe
Comment #3
lyricnz commentedBump. This bug is happening when people update Ubercart to D7.
Comment #4
catchThe 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.
Comment #5
catch#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.
Comment #6
lyricnz commentedUpdated 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.
Comment #7
lyricnz commentedComment #8
catchAdded a test.
Comment #9
deepbluesolutions commentedthis 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
Comment #10
Vandalf commentedOh, Catch! I love you! You fixed my site for me! :)
I owe you a cold one for this! Thanks a ton!
Comment #11
fonant commentedThe patch in #8 provides useful information for me too.
Comment #12
lyricnz commentedReroll for D8 changes.
Comment #13
mstrelan commentedI 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 = FALSEto outside of theif (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."?
Comment #14
lunk rat commented+1 for patch in #8. I have the same experience described in #9. Helped me out a lot!
Comment #15
mgifford#12: update-messages-hidden.patch queued for re-testing.
Comment #17
mgiffordRe-roll. This seems like a nice enhancement.
Comment #19
mvcBackport of #1159160-17: Error messages from update.php sometimes hidden to D7.
Comment #20
mgiffordWe can test this in D7 and then bring it back up to D8.
Comment #21
mvcmgifford, 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 :)
Comment #22
mgiffordThanks @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.
Comment #29
cestmoi commentedI used only the first part of the patch for my
drupal 8.6.1and 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 !
Comment #35
lendudeDiscussed 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.
Comment #36
quietone commentedFive 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!