Problem/Motivation
Say you're on the modules page and update manager tells you this:
The installed version of at least one of your modules or themes is no longer supported. Upgrading or disabling is strongly recommended. See the project homepage for more details. See the available updates page for more information and to install your missing updates.
The text "available updates" is then linked to admin/reports/updates/update which says:
All of your projects are up to date.
It's necessary to go to admin/reports/updates to see what module and what the issue is:
Project not supported: This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended!
Proposed resolution
Include information about unsupported projects on the 'Update' form at /admin/reports/updates/update
2 possible approaches, we must pick one:
Include them in the 'Manual updates required' table - YES
See #25
Also as part of this issue, make the following changes to this table:
- Change the heading of that table to something more generic, perhaps "Recommended action".
- Change the existing entry in that column (in the row for Drupal core) to a full sentence: something like "Upgrade to 8.8.x ...".
- Rewrite the second sentence in the new row to avoid the passive voice.
Add a new table for unsupported projects - No
Along the lines of what we did at #3113992: The 'Update' page has no idea that some updates are incompatible. A separate table might be easier to deal with, we can optimize the column headers to make sense for unsupported projects, etc.
Downside: Adds Yet More Tables(tm) to this page. In a really wonky example, a site might have 5 tables on this page:
- Normal available updates with checkboxes to update them (the functional part of this UI)
- Manual updates (core)
- Unsupported projects (this issue)
- Incompatible updates #3113992: The 'Update' page has no idea that some updates are incompatible
- Uninstalled/disabled projects #3117553: Change UI for /admin/reports/updates/update to not mention "Enabled/Disabled" modules and themes
Something like:
Unsupported projects
Name | Installed Version | Additional information |
---|---|---|
Page Access | 8.x-1.1 | This project is no longer supported, and is no longer available for download. Disabling everything included by this project is strongly recommended! |
(more or less).
Remaining tasks
Decide which approach we want.- Implement it. #38
- Update/add test coverage.
- Reviews/refinements.
- RTBC.
- Commit.
User interface changes
Changes to the "Manual updates required" table on the update your site form at /admin/reports/updates/update:
- Include rows for projects that are now marked unsupported.
- Change the heading of that table to something more generic, perhaps "Recommended action".
- Change the existing entry in that column (in the row for Drupal core) to a full sentence: something like "Upgrade to 9.1.2 ...".
- Rewrite the second sentence in the new row to avoid the passive voice.
Before
After
API changes
Probably nothing public.
Data model changes
Nope.
Release notes snippet
TBD.
Comment | File | Size | Author |
---|---|---|---|
#48 | After.png | 48.06 KB | quietone |
#48 | Before.png | 30.76 KB | quietone |
#25 | Update_My_Site_-_2017-10-13_14.07.12.png | 44.52 KB | David_Rothstein |
Issue fork drupal-961060
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
RoboPhred CreditAttribution: RoboPhred commentedAttached is a patch that forces the link to go to the module list rather than the update list in the event of an unsupported contrib module.
Comment #3
RoboPhred CreditAttribution: RoboPhred commentedThat patch was rolled on 7.x-beta2, probably why it won't apply. Can someone re-roll?
Comment #4
RoboPhred CreditAttribution: RoboPhred commentedManaged to get CVS working
Comment #5
RoboPhred CreditAttribution: RoboPhred commentedLine endings, eh? Lets try this then...
Comment #6
RoboPhred CreditAttribution: RoboPhred commentedAlright, nevermind cvs then. Apparently the first patch just had a bad filename, the offsets are the same. Trying that.
Comment #8
RoboPhred CreditAttribution: RoboPhred commentedAlright... I reviewed the patch documentation again. Line endings are UNIX style, path is relative to core. Generated by diff -up. Let's put a stop to this nonsense...
Comment #9
RoboPhred CreditAttribution: RoboPhred commentedComment #10
dwwI know it's confusing, but "update.module" is for the part of core (added in 6.x) that checks for available updates to your modules and themes (now called the "Update manager" since it can also install/update your code). The "update system" component is for DB schema updates care of update.php...
Anyway, I don't exactly follow what this patch is doing (since I didn't apply it and look at the surrounding code). However, from the description, it sounds like a bad workaround to a deeper bug. We don't want messages to send people to the available updates page. We want to send them to the Update manager's "Please update my broken stuff" action page by default, not the report showing all the info about available updates. If the Update manager page fails to handle unsupported projects correctly, we need to fix that, not just avoid sending people to that page.
We'll need to see detailed steps to reproduce the bug, ideally with some screenshots. Otherwise, it's hard to verify the bug and fix it.
That said, if the Update manager page doesn't handle unsupported project correctly, that's not a minor bug. In fact, I'd call this major, since it has the potential to confuse users into not upgrading unsupported code, which could be a big problem for them.
Comment #11
mlncn CreditAttribution: mlncn commentedMaybe it's a very rare issue, at least for the one that i can easily reproduce, but it's likely to happen when people really need good information: When a module they have installed has been de-listed from the recommended releases.
To reproduce:
drush dl cck-7.x-2.x-dev
drush en cck
drush rf
Visit the modules page, admin/modules, and note this error message at the top:
Follow the link for available updates, admin/reports/updates/update and... the page lists no problems. Because there are no updates available for a de-listed module.
Maybe just Not supported from admin/reports/updates could be shown on the admin/reports/updates/update page? Or we can just link to the main updates page that lists all issues to make the "for more information" part of the message consistently true.
Comment #12
dwwAs I said, we do *not* want to link to the available updates report. We want to link to the page that lets users recover from the warning, not a page the further overwhelms them with big scary warnings.
Even though unsupported modules are an edge case, it's a major bug if the Update manager page doesn't let you upgrade from an unsupported branch to a newer major branch. See also #977414: Allow updating to a -dev or new major branch with Update manager (related, but different).
I *thought* we had code in Update manager to help users upgrade from an unsupported branch to the now-recommended branch. :/ We'll have to play with the steps above to see what's going on here.
Comment #13
mlncn CreditAttribution: mlncn commentedOK, this is a really edge case then, because there's no recommended release for CCK for Drupal 7 at all. But the same thing would happen for un-maintained modules which are delisted for security reasons, right?
Comment #14
dwwPresumably, yes.
Comment #15
dwwUpon further thought, if there's *no* recommended releases at all for the project, then maybe the update manager page needs to just print a warning about it. That'd be kind of like the situation for when core needs an update -- it's listed on the page as an update you need to do, but the update manager can't actually do the update itself.
Comment #16
dwwWhoops, this fell of my radar without the 'string freeze' tag. I don't have the capacity to do anything about this now, other than pray.
Comment #17
sunComment #18
catchI'm not even clear what the bug is here, downgrading since this has only been reproduced with CCK, which was an edge case that did not meet the major bug definition anyway (since the module wasn't properly unsupported).
Comment #23
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedI marked the linked issue as a duplicate. It has a patch which is closer to where the discussion here ended up, although I'm not sure it's really the right approach. It is treating UPDATE_NOT_SUPPORTED as the special case, but I think we actually want to deal with "no recommended releases" as the special case, due to this code currently in the Update Manager:
It seems like that code is what can lead the following code to trigger, even when all modules aren't actually up to date:
Comment #24
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedI'm also putting this back to major priority, since this is easy to reproduce with modules that have been marked unsupported on drupal.org, including ones that were marked unsupported by the security team.
Some examples that work to test it out on (at the time of this writing) include https://www.drupal.org/project/google_website_optimizer (for Drupal 7; this is the example used in the issue I marked duplicate above) and https://www.drupal.org/project/page_access (for Drupal 8).
Comment #25
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedHere's a potential patch, along with a screenshot showing how it works:
Comment #27
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedI'm going to credit the person who worked on the patch at #2870690: Unsupported releases don't show up on ' Available updates' - although I did this patch differently, I feel like I at least borrowed some rough ideas from that one.
Comment #32
dwwDefinitely needs a reroll / re-write after #3113992: The 'Update' page has no idea that some updates are incompatible landed. Still seems worth fixing this, so that the 'Update' page doesn't say "Everything's cool" when you've got unsupported projects.
Comment #33
sokru CreditAttribution: sokru as a volunteer commentedReroll. Original patch had uneven number of closing brackets. I assume this would probably would need some tests.
Comment #34
dww@sokru: Thanks for working on this!
Re: "Original patch had uneven number of closing brackets" -- I doubt that. Test results for #25 would have exploded if there was a syntax error. I bet git just got confused trying to apply the old patch to the new code, which was refactored by #3113992 and some of the relevant context is now indented another 2 spaces...
Yes, definitely needs tests. See the new tests I added at #3113992: The 'Update' page has no idea that some updates are incompatible. You can almost certainly expand those to cover this, too. Lemme know if you need help with that.
I need to apply the patch and see it in context to actually review this. Quick look of the .patch file itself seems potentially wrong, but I can't say for sure. Hope to get to this soon, but I can't promise when. Hopefully in less than 9.5 years like the last time I stepped away from this issue. ;)
Thanks/sorry,
-Derek
Comment #35
webchickWe attempted to look at this on the UX meeting today, but are a bit lost as to what the problem is, how to reproduce it, and what the "before/after" solution being proposed is. An issue summary update would be very helpful.
Comment #37
dwwProblem and how to reproduce were clearly spelled out in the original summary: Have a site with a module that's been marked 'Unsupported'. But I updated the summary to use the default template, and to flesh out pros/cons of the proposed resolutions.
Cheers,
-Derek
Comment #38
benjifisherWe discussed this issue at #3131774: Drupal Usability Meeting 2020-05-05.
Thanks for updating the issue summary. We recommend
If the table header already says "Recommended action", then we do not have to say "... is strongly recommended" in that second sentence. Something like "If you can, disable everything that depends on this project and uninstall it" is a step in the right direction.
Comment #39
dwwThanks for the review and direction, @benjifisher et al! I started looking into implementing your suggestions.
The proposed fix from #33 would start displaying info about projects without a recommended version. However, upon closer inspection, that'd also start talking about projects where we failed to fetch available update history (the net is down, you've got a custom project without a history on d.o, etc, etc). Properly handling all of these cases seems rather scope creepy. Partly handling them is also somewhat weird. There's also some refactoring of the code for that form that needs to happen at #3121775: Refactor UpdateManagerUpdateForm::buildForm() to make ::removeCheckboxFromRow() unnecessary. What should we/I do?
A) Just fix the major bug by specially handling the 'project marked unsupported' case, continue to have the implementation a bit clumsy, but Get It Done(tm) with the smallest possible patch for hopefully easier backporting. Then cleanup (some of) the implementation details at #3121775, and finally circle back in Yet Another Follow-up(tm) to handle the other cases where there's no recommended version to use.
B) First fix #3121775 so that we've got a stronger foundation to build on, then fix the bug. Would #3121775 be backportable to All The Branches(tm)?
C) Expand the scope of this issue to properly handle all cases were there's no recommended version, but ignore #3121775 and leave the implementation details sorta weird until it's "safe" to do such refactoring (9.1.x?)
D) Expand this issue's scope to handle everything, and implement it nicely, so that #3121775 becomes unnecessary.
E) Other?
Thanks,
-Derek
Comment #40
xjmPer @dww I was looking at a stale issue summary, so tagging for an update.
Comment #41
dww@xjm Clarified that for issue scope, we're basically going with #39.A. No sense scope creeping, nor blocking a major bug fix on code refactoring and cleanup.
Also likely that this is 9.1.x only at this point (due to string / UI changes).
Summary updated from #38 and UX meeting.
Comment #48
quietone CreditAttribution: quietone at PreviousNext commentedI rerolled and then updated the patch according to #38. I started from the patch in #25 because of the comments about brackets in #33 and #34, and there was no diff.
I've added some if statements to get around a possible undefined variable. It is a bit messy but instead of focusing on that I want to see what tests fail. Also, I am getting PHPStan errors locally on a line not changed by this patch so want to see what testbot does.
Comment #50
ressa CreditAttribution: ressa at Ardea commentedThanks, just updating the title, which lost "upal's" :)
Comment #51
quietone CreditAttribution: quietone at PreviousNext commentedJust converted to an MR and hid patched, nothing else.