Problem/Motivation

Discovered while working on #3113992: The 'Update' page has no idea that some updates are incompatible

Drupal 8 no longer has the notion of "disabled modules". Either they're installed and enabled, or completely uninstalled. There's no such thing as an installed + disabled module. For example, the 'Available updates' listing report (at /admin/reports/updates) looks like this:

Screenshot of 'Available updates' report showing an 'Uninstalled module'.

However, the 'Update' page at /admin/reports/updates/update was never modified to account for this change in the rest of core's extension handling. If you enable the "[x] Check for updates of uninstalled modules and themes" checkbox at /admin/reports/updates/settings and then visit the 'Update' form you still see "Disabled"

Proposed resolution

  • Modify the 'Update' form UI to match the 'Available updates' report to display about "Installed" and "Uninstalled" instead of "Enabled" and "Disabled".
  • Change the table heading from "Installed version" to "Site version".

Remaining tasks

  1. Reviews
  2. RTBC
  3. Commit

User interface changes

For patch #36

Before - installed only

Before - with uninstalled

After - installed only

After - with uninstalled

API changes

None.

Data model changes

None.

Release notes snippet

TBD, probably not.

Comments

dww created an issue. See original summary.

dww’s picture

Issue summary: View changes
StatusFileSize
new69.62 KB
new37.77 KB

Adding screenshots showing the problem, and how it looks on available updates report for comparison.

xjm’s picture

Version: 9.0.x-dev » 9.1.x-dev

So long as we just change the string, just changing "Disabled" to "Uninstalled" or "Not installed" seems like a good idea (and TBH I'm not sure how we missed it during the D8 development cycle).

dww’s picture

Re: #3: 👍

(and TBH I'm not sure how we missed it during the D8 development cycle)

I think cuz most core devs completely forget this page exists. They use composer, drush, and/or CI, and never use this UI on any sites. Perhaps they utilize the killswitch to completely disable it. Out of sight out of mind...

Yeah, I think a string change is most of what we need. The scope creeper in me would want to change variable names and other internal code to match. E.g. stuff like this:

-            $projects['disabled'][$name] = $entry;
+            $projects['uninstalled'][$name] = $entry;

Would that be viable, while we're at it?

Thanks,
-Derek

xjm’s picture

We'd also have to change "Installed version" to "Local version" or something. Probably worth a UX meeting discussion.

I'm terrified of changing the structured array keys of the project data. Probably could make that a (scarier) followup.

dww’s picture

Issue tags: +Needs usability review

The lines I pasted are completely isolated to UpdateManagerUpdateForm::buildForm(). They're not the ArrayPI stuff passed around everywhere. I agree that'd be way more scary to fix as part of this.

Agreed on UX meeting discussion. Tagging.

Thanks,
-Derek

xjm’s picture

String changes are also backportable during beta, but form structure changes aren't. So let's keep it to strings.

dww’s picture

Re: #7: Okay, makes sense.

Opened #3121870: Change implementation details of UpdateManagerUpdateForm to use install/uninstall to cleanup the resulting technical debt (some day).

Thanks
-Derek

dww’s picture

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

p.s. Based on my newfound understanding of the desired usage of the version selector, I believe the goal would be to get this done in 8.9.x before beta1, right? As a string change, it's not eligible for 8.8.x patch-level backport. But we could still fix this before 8.9.0-beta1, right?

dww’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +Needs screenshots
StatusFileSize
new806 bytes

This needs new screenshots, but I need lunch more. ;) Tagging for now.

dww’s picture

Issue summary: View changes
Issue tags: -Needs screenshots
StatusFileSize
new1 KB
new914 bytes
new257.09 KB

Now with 100% less syntax errors. ;) And an updated screenshot.

dww’s picture

p.s. Re:

TBH I'm not sure how we missed it during the D8 development cycle

Also because I forgot this whole feature is off by default, unless you opt-in at the 'Settings' tab to enable:

[x] Check for updates of uninstalled modules and themes

dww’s picture

Title: Change UI for /admin/reports/updates/update to not mention "Disabled" modules and themes » [PP-1] Change UI for /admin/reports/updates/update to not mention "Disabled" modules and themes
Issue summary: View changes
Status: Needs review » Postponed

I don't want to try to add test coverage for this until #3113992: The 'Update' page has no idea that some updates are incompatible lands so we have a test class to extend.

dww’s picture

dww’s picture

StatusFileSize
new6.92 KB
new5.59 KB
dww’s picture

Title: [PP-1] Change UI for /admin/reports/updates/update to not mention "Disabled" modules and themes » Change UI for /admin/reports/updates/update to not mention "Disabled" modules and themes
Status: Postponed » Needs review

Forgot to unblock this when #3113992: The 'Update' page has no idea that some updates are incompatible landed. #15 still applies cleanly, queuing for testing.

webchick credited yoroy.

webchick’s picture

Summary of the discussion at #3129683: Drupal Usability Meeting 2020-04-28:

  • +1 to getting rid of the word "Disabled" since that's not a thing anymore.
  • +1 to turning it into "Uninstalled"
  • +1 to "Installed version" column heading making zero sense for "Uninstalled" modules. :P
  • -1 to "Local version" though, since it's not entirely clear what that means (local to what? is that on my localhost? etc.).

We went back and forth a bit on this labeling ("Your" version? — too informal "Current" version? — mistaken with "current" version meaning "the most recent one" like it does in update status XML) and eventually came 'round to suggesting "Site version" for both.

dww’s picture

StatusFileSize
new6.92 KB
new1.45 KB

@webchick re: #19: Excellent, thanks! I agree 'Local version' is weird. Happy to go with 'Site version'.

Can we untag this for 'Needs usability review' then?

Anything else, or is this RTBC?

Thanks again!
-Derek

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

dww’s picture

Issue tags: -Needs usability review

Yeah, since this was discussed at #3129683: Drupal Usability Meeting 2020-04-28 I'm un-tagging for a UX review (which is complete).

I can't self-RTBC. Anyone else willing to do it?

Thanks!
-Derek

dww’s picture

StatusFileSize
new6.93 KB
new2.99 KB
dqd’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new37.67 KB
new37.96 KB
/var/www/html/d91$ git apply -v 3117553-23.patch
Checking patch core/modules/update/src/Form/UpdateManagerUpdate.php...
Hunk #1 succeeded at 275 (offset 2 lines).
Checking patch core/modules/update/tests/fixtures/release-history/ccc_update_test.1_1.xml...
Checking patch core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php...
Applied patch core/modules/update/src/Form/UpdateManagerUpdate.php cleanly.
Applied patch core/modules/update/tests/fixtures/release-history/ccc_update_test.1_1.xml cleanly.
Applied patch core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php cleanly.

Agree with "site version". +1 for the finding and fixing this. Weird left over! Patch code seems to have no nitpicking or coding standart issues etc. Applying patch and runnig thru the steps to reproduce the original issue do not show any new issues or flaws with it. Changes apply like expected. Since this patch does not provide any bigger functionality changes or risky code injections I consider this RTBC from here.

Patch #23 before / after screenshots uploaded...

xjm’s picture

Status: Reviewed & tested by the community » Needs review

+1 for "Site version"; that's great.

+++ b/core/modules/update/src/Form/UpdateManagerUpdate.php
@@ -273,10 +273,13 @@ public function buildForm(array $form, FormStateInterface $form_state) {
+        // We don't want to just clobber the value in $headers in case it's used
+        // below for another table, so we array_merge here to only update the
+        // copy used for this table.
+        '#header' => array_merge($headers, ['installed_version' => $this->t('Site version')]),

I wonder though, maybe a little clobbering would be OK? Like consistency is also helpful for the user trying to understand the form, and "Site version" would make sense for the other tables too.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.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.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.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.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.

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

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs reroll

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

+1 for this idea and still applies to D10 where disabled is used.

Tagged for reroll. as there are some build errors in #23

Also agree with #25 that consistency would be nice so if "Site version" can be used in the other spots too.

xjm’s picture

Category: Task » Bug report
Issue tags: +Usability

Thanks for rediscovering this issue!

IMO this is a usability bug, so recategorizing.

ameymudras’s picture

Status: Needs work » Needs review
StatusFileSize
new7 KB
new2.83 KB

Trying to fix errors in #23

Status: Needs review » Needs work

The last submitted patch, 33: 3117553-33.patch, failed testing. View results

Version: 10.1.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, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Title: Change UI for /admin/reports/updates/update to not mention "Disabled" modules and themes » Change UI for /admin/reports/updates/update to not mention "Enabled/Disabled" modules and themes
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new43.68 KB
new75.28 KB
new43.98 KB
new75.35 KB
new3.9 KB
new8.36 KB

I rerolled the patch and there was no issues with that task. The test failure was caused by the test not setting up the new xml file to be returned.

It seemed odd to me to see 'Enabled' on the page so I expanded the scope to fix Enabled/Disabled on this single page. It seems sensible to me and was easier to do this in one issue instead of two. There were minimal changes for that in both the code and the test.

Updating the IS, and addingh before/after screenshots.

quietone’s picture

Issue summary: View changes
Issue tags: -Needs reroll
StatusFileSize
new836 bytes
new8.05 KB

This patch addresses #25, removing the changes.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Verified the test change by applying patch #37
Install some contrib module
Go to en/admin/reports/updates/update
Verified text change.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 37: 3117553-37.patch, failed testing. View results

quietone’s picture

Status: Needs work » Reviewed & tested by the community

An unrelated random failure, #3380433: [random test failure] CronRunTest::testAutomatedCron. I am restoring RTBC.

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Ran the failing test locally just to be sure.

Committed 06b7f5c and pushed to 11.x. Thanks!

  • lauriii committed 06b7f5c5 on 11.x
    Issue #3117553 by dww, quietone, ameymudras, diqidoq, xjm, smustgrave,...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.