update.php reports failure without details

Created on 5 February 2014, almost 11 years ago
Updated 5 August 2023, over 1 year ago

Problem/Motivation

When visiting update.php if there are any warnings you'll see
Some of the pending updates cannot be applied because their dependencies were not met.
without further information.

Steps to reproduce

Try enabling core's test module Update test with an invalid hook_update_8000().
Click continue
Notice the message but no explanation for what failed.

Proposed resolution

Display more detail about what is throwing the warning.

Remaining tasks

Fix escaping
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Original post

When visiting update.php my head2head install gives

Some of the pending updates cannot be applied because their dependencies were not met.

without further information.

Checking for the value of the offending module give message like

breakpoint module cannot be updated. Its schema version is 0, which is from an earlier major release of Drupal. You will need to migrate the data for this module instead.

These should be printed the least but I guess the code flow is wrong too as the should also be a report about the number of failures as

     if ($incompatible_count) {
        $form['start']['#title'] = format_plural(
          $count,
          '1 pending update (@number_applied to be applied, @number_incompatible skipped)',
          '@count pending updates (@number_applied to be applied, @number_incompatible skipped)',
          array('@number_applied' => $count - $incompatible_count, '@number_incompatible' => $incompatible_count)
        );
      }

suggest. Attached patch only fixes the list of message.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Database update 

Last updated 4 days ago

No maintainer
Created by

🇳🇱Netherlands clemens.tolboom Groningen, 🇳🇱/🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024