Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
extension system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Feb 2022 at 13:39 UTC
Updated:
31 Mar 2022 at 19:24 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
murilohp commentedComment #3
dwwThanks for opening this issue and getting it started with a patch! Mostly looks good, with a few concerns:
I'd fix this by leaving the placeholder as just
%extensionsand fixing the key we use in the array param. I think that'd be more friendly for translators.It would also mean folks wouldn't have to re-translate this to see the fix. Except we're changing the string to add the link. So folks will have to re-translate, anyway. ;) But I still think "%extensions" is nicer to work with than "%extension_list".
Love it. I think this is a good UX improvement! Hope that's considered in scope for this issue, but we *might* have to split it off to a separate feature request for scope reasons. TBD.
Comment #4
dwwIf #3.2 is real, we can fix this bug alone via #3.1 and then it's *not* a string-breaking change at all. Adding the link could be a follow-up feature. Not sure it's worth it, but I'll try to get some scope input from other folks before we go much further...
Comment #5
dwwClarifying the title that the names of the extensions aren't being displayed, but an empty %extensions placeholder.
Comment #6
dwwCleaning up the issue summary and release note a bit.
Should we add an assertion to the test for obsolete extensions on the status report to make sure we don't see the literal
%extensionsanywhere? Not sure we ever do that in core. Technically, this is a bug, so we should have a failing test for it. 🤔 But maybe we should make an exception here. 😉Seems slightly weird to start to add test assertions like this.Comment #7
dwwGot input from @larowlan that we should keep the link in a separate issue and have this *only* fix the placeholder replacement bug. So I split that off to #3266449: Add a link to the Status report warning about obsolete extensions so site owners can fix the problem.
Also got feedback on the test. Instead of setting up the conditions where the warning is on the status report and doing:
We should do the positive assertion for what we expect to see there... the right name of the extension filled in.
So yeah, definitely needs tests.
Comment #8
dwwStill needs tests, so leaving NW and not bothering with a testbot run on this, but this removes the link stuff for now and fixes this without changing the t() string (making this suitable for further backports since it's non-disruptive).
Comment #9
dwwMoved link code to #3266449-2: Add a link to the Status report warning about obsolete extensions so site owners can fix the problem and credited @murilohp over there.
Added tests. The test-only patch is basically the interdiff, except I also hacked drupalci.yml to only run the failing test.
Comment #10
dwwCrossing off one more from remaining tasks. 🎉
Comment #12
dww🎉https://www.drupal.org/pift-ci-job/2327778
Now we wait for the green result and this should hopefully be RTBC... 🤞
Comment #13
murilohp commentedThe patch looks good to me! Testing locally the bug is fixed, the test-bot is happy and the issue summary is up to date. So it's RTBC for me.
Comment #14
alexpottI was going to say that this needs to use the constants from the class but in fact this test module can be removed. See next comment.
This can be replaced with
I think this is preferable to maintaining more test code.
Comment #15
dww@alexpott: Slick trick! TIL. Much better, totally agree. I'll give that a spin now...
Comment #16
dwwComment #19
dwwRandom fail, re-queued.
Comment #20
murilohp commentedIt looks good to me! Thanks @dww and @catch, it's good to know how to "install" obsolete modules during the test.
Now regarding the patch, just a quick question:
After the uninstall, don't we need to run a
$this->rebuildAll();in order to remove the warning message? Or this is something that does not matter to the test itself?Comment #21
alexpott@murilohp it doesn't currently matter for the test. The rebuildAll() is necessary because of how we've tricked the system into installing. I think maybe we should go back to the form and check that the warning has gone after uninstalling the module.
Comment #22
murilohp commentedOoops, sorry for the "@catch" on my previous comment @alexpott.
About testing the message after the uninstall, I think @dww inverted the order, I mean the first thing is to test if the message is not displayed:
After that, an obsolete module is installed and then test if the message is now being displayed.
My point is, if we add one more test to validate after the uninstall, we would just being replicating the test from the first step. Of course, we could invert the tests, first install and check, and then uninstall and recheck the page, what do you think?
Comment #23
alexpott@murilohp I think it is fine to test both before and after uninstalling. But I also think the patch is fine as is.
Comment #24
murilohp commentedAlright! My concern was testing unnecessary things, but I agree with you, it's fine to test the message after uninstall the module, I've changed the patch and added the new test.
Comment #25
vinodhini.e commentedI applied patch #24, It's working for me.
I am attaching a screenshot before and after applying the patch.
Thanks.
Comment #26
kristen polThanks for updating the patch and testing. Mostly comment nitpicks but I did find one typo. Back to needs work for at least fixing the typo.
1. Nitpick: Should there be a new line above the comment?
2. Nitpick: I would simplify and remove
Alsoand(yet), i.e.Make sure there are no warnings about obsolete modules.Nitpick: Should there be an empty line between these? If so, is a comment warranted?
Typo:
uninstall=>uninstalling.Comment #27
dww@Vinodhini.E: Thanks for the screenshots. I updated the summary to add the missing sections and to embed those screenshots into the User interface changes section. In the future, if you're going to upload screenshots for credit, please do this task yourself. Thanks!
@Kristen Pol: Thanks for the review! All nits fixed.
Comment #28
murilohp commentedThe issue summary looks good to me, the testbot is happy and the patch looks good to me, so RTBC!
Comment #29
murilohp commentedJust one more thing, this issue is a bug, is it necessary to have a change record here?
Comment #30
dwwThanks for the RTBC, @murilohp. I hope it sticks. ;) Normally, since you and I both contributed code here, we wouldn't be allowed to RTBC this. Maybe @Kristen Pol will +1 it to add more confidence to the status...
No, we don't need a CR for every change. Only changes that site builders or module / theme maintainers would have to know about and potentially take action on. API changes, new deprecations, changes to Twig templates them might have overridden, etc. This is none of that, just a simple bug fix in a (somewhat rare/obscure) part of the Drupal UI. Translators don't even need to know, since we didn't change the t() string.
Comment #31
kristen polReviewed the changes and they cover the feedback in #26, thanks.
One thing I just noticed is it probably makes more sense to move the
uninstallto under the comment about uninstalling.Comment #32
dwwRe: #31: Sure, makes sense.
Comment #33
murilohp commentedSorry about that, since you provided the last patch, I thought I could RTBC this, but it makes sense, we both worked here.
And thanks for explanation about CR!
Comment #34
alexpottCommitted b02f815 and pushed to 10.0.x. Thanks!
Committed ea4dbb5 and pushed to 9.4.x. Thanks!
Comment #37
dwwYay, thanks! Unblocked the child: #3266449: Add a link to the Status report warning about obsolete extensions so site owners can fix the problem
I was going to ask about a 9.3.x backport, then I realized 9.3.x's status report doesn't know anything about obsolete extensions. 😂 This bug is only in 9.4.x+.
Cheers,
-Derek
Comment #38
dwwUgh, sorry, stale form values or something.