This is one settings that is really missing in Drupal (both 7 and 8).
It was really annoying because (almost) every admin page has this Update notification message if you don't have the latest modules and you want to keep Update module enabled because of Drush up.
The goal of this issue is to hide this notifications in Update module's settings page - /admin/reports/updates/settings
For all users.
Like this.
Of course it will be enabled by default but at least you can disable it to stop spamming you while developing.
P.S. The similar patch would apply to Drupal 8 too.
EDIT:
Drupal 7 patch in #1
Drupal 8 patches from #2 on.
Alternative approaches
There are three different approaches to this problem, to be discussed which one to use finally. Afterwards both others should be closed as duplicate:
#3239970: Show update notifications only with permission "administer software updates"
#332796: Add permissions to the update.module to hide warnings
#2059375: Update notification messages as an option in settings (THIS)
Comment | File | Size | Author |
---|---|---|---|
#49 | After_apply_patch.png | 218.59 KB | vikashsoni |
#49 | Before_apply_patch.png | 209.33 KB | vikashsoni |
Issue fork drupal-2059375
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
alesr CreditAttribution: alesr commentedA patch that adds a settings from the image above is applied.
If disabled, the notifications about updates are not displayed.
Enabled by default to keep the notifications on, as it does now.
Comment #2
alesr CreditAttribution: alesr commentedA patch from #1 is for Drupal 7.
Here is a patch for Drupal 8, which I hope will be backported to D7.
Comment #3
damiankloip CreditAttribution: damiankloip commentedDo you think we could do with a description here too? Maybe this is a question for the UX guys.
Can we use the method on the Drupal class instead please. i.e. Drupal::config('update.settings')
Comment #4
alesr CreditAttribution: alesr commentedNew patch with changes from #3 included.
Comment #6
alesr CreditAttribution: alesr commentedFixed patch with added interdiff.txt.
Comment #7
slashrsm CreditAttribution: slashrsm commentedThis should be removed and re-added in a follow-up when/if backport is committed to D7.
This patch might have security implications. I can imagine site admins that would permanently uncheck this, which could result in their site using without necessary security upgrades. I would add a warning into description that would suggest admins to have this enabled at all times.
Comment #8
alesr CreditAttribution: alesr commentedslashrsm, thanks for your review.
Every system has (or should have) an option to silence the warnings about updates.
Think of applications or OSs for example. You can select "Update every day/week/month", "Notify me", "Don't notify me" among others.
Don't forget that those who want this silenced have Update module disabled or are using even more extreme solutions like "let's just CSS this out" http://drupal.stackexchange.com/questions/25042/disabling-update-notific... !!
We are talking here about having Update module enabled so you can still use Drush (drush up) or do the manual check-ups and just silence the warnings, that are annoying while you are developing.... (thinking) "Yes, I know I don't have the latest version of this x.x-dev module. I want it this way, just stop spamming me on every page Update module". I will "drush up" you later and leave me alone now."
Of course extra notification could be added to this setting's description so the admins would be aware of that, but please keep in mind that if we don't implement this settings, users will be disabling Update module to shut down those warnings! And we (and drupal.org statistics) don't want that.
I'm aware that not all developers will need it, but I still see an advantage to have this setting.
I will set this issue back to "needs review" so we can talk through if we're going to push this into core or leave it like this for those who wan't patches for D7 and D8.
Comment #9
slashrsm CreditAttribution: slashrsm commentedI agree with @alesr. People will try to disable those warnings one way or another if they decide to. It is much better to introduce sane way to do it.
Description could be something like this:
Comment #9.0
alesr CreditAttribution: alesr commentedEdit
Comment #9.1
alesr CreditAttribution: alesr commentedbolded
Comment #10
jetwodru CreditAttribution: jetwodru commentedI really dislike the system message especially when demonstrating a system to clients. I want to retain the Update Manger for installing module directly but does NOT want the system message to appear prompting the users from time to time. The clients thought of having system problems during demonstration. It's totally annoying without a way to disable it. Thanks
Comment #11
alesr CreditAttribution: alesr commented@jetwong98, that's exactly why the we need this option in configuration.
Comment #12
jetwodru CreditAttribution: jetwodru commentedWill this be updated into D7 Core ? Now keeping a log of all patched modules coz always having to re-apply the same patches after upgrading to a newer version. Thanks
Comment #13
alesr CreditAttribution: alesr commentedIt needs some attention of core committers.
Comment #14
alansaviolobo CreditAttribution: alansaviolobo commentedreroll
Comment #15
mikey_p CreditAttribution: mikey_p commentedI think we could probably use a more stern warning here and lose the message about the default value.
Comment #16
Leeteq CreditAttribution: Leeteq commentedComment #17
alesr CreditAttribution: alesr commentedRerolled #14 and fixed with #15.
Comment #20
wturrell CreditAttribution: wturrell as a volunteer commented- Reroll for 8.2.x.
- URL of settings page added to issue summary.
- Probably needs tests.
Comment #22
Xilis CreditAttribution: Xilis at Google Summer of Code commentedCannot reproduce in 8.3.x/8.4.x, it is not an issue anymore (the warning message is not displayed on all config pages, just on the status report page and the Update Manager's list of available updates).
Comment #23
Xilis CreditAttribution: Xilis at Google Summer of Code commentedSecurity patches still show a warning message so I'm reopening and adding rerolled patch for 8.4.x.
Comment #27
edurenye CreditAttribution: edurenye at Digitalist commentedWe must not have the warning message disabled by default, so we must add an update path to set that option to TRUE.
Comment #28
alesr CreditAttribution: alesr commentedIt is not disabled by default and "update_system_notifications" setting is already set to "true" if you check the patch.
Comment #30
klonos...or you can re-label and repurpose the checkbox, and make it "Hide system notifications about security updates" instead.
Comment #31
alesr CreditAttribution: alesr commented(IMHO) I hate when there's a list of checkboxes with some having the text "Enable this.." while others starting with "Disable that..." leading to confusion when trying to interpret what they do.
Comment #32
volegerAddressed #27. Added the hook_update_N implementation to keep showing messages for existing projects.
#31 In my opinion, for that reason, we need to add a more descriptive message for the user to be sure what action will be performed and how this action affects the site functionality.
Updated title and description for the checkbox. Added test case to be sure that description is built correctly.
Comment #33
volegerMessages are showed, checkbox checked
Messages are hided, checkbox unchecked
Comment #35
volegerOf course, immutable configs. Changed to editable.
Comment #37
andypostBetter move it to post update hook
Comment #40
joaopauloscho CreditAttribution: joaopauloscho at Zoocha commentedWe're having a conflict with the hook update number in some of our sites. As this patch hasn't received updates recently and most of the people that are using to stop showing the notifications on their sites, I'm removing that hook update in order to stop the conflict.
Comment #41
joaopauloscho CreditAttribution: joaopauloscho at Zoocha commentedSorry, the right patch is this one.
Comment #42
ptmkenny CreditAttribution: ptmkenny commentedPatch in #41 didn't apply; also, all patches need to go to D9 first and apply to the dev branch, currently 9.2.x.
Comment #44
volegerAddressed #37
Attached interdiff between the commit in MR and #35 after reroll against core 9.2.x
Comment #45
volegerUpdated the test
Comment #47
PasqualleAs these messeges are the number 1 reason why update module is disabled, it is critical to resolve this issue.
https://twitter.com/webchick/status/1362569962695446530
Comment #48
xjmThis does not meet the criterial for a critical issue.
Comment #49
vikashsoni CreditAttribution: vikashsoni as a volunteer and at Zyxware Technologies commentedApply 23.patch working fine and added Show Update module system notifications in update setting sharing the screenshot
Comment #51
AnybodyRTBC+1 for MR!73. It works great and is a really important improvement for many clients / users as I wrote in my comment #47 in #332796: Add permissions to the update.module to hide warnings already!
Completely agree with @Pasqualle in #47:
This is IMPORTANT for site owners / clients as they are frightened by this message - but as @xjm correctly said, it's not a critical issue in the Drupal.org definition ... ;)
So please, could we have Core Maintainer feedback here on how to proceed? Do we need a UX review or something like that? We should also finally discuss what to do with #332796: Add permissions to the update.module to hide warnings and if the approach taken here is the right one or if the message should instead be tied to the "Administer software updates" permission as a more simple solution.
Thank you!
Comment #52
bkosborneAgreed. MR looks good to me.
Comment #53
volegerRerolled against 9.3.x
Looks good to go
Comment #54
dwwThanks for all the work here!
I don't want to hold this up indefinitely, but I'd love to take a closer look at both this and #332796: Add permissions to the update.module to hide warnings before either one is committed. We almost certainly don't want both. I don't think we should add a setting for this if we're going to tie it to permissions, anyway. I think we should assess before we proceed. Tagging for myself (or @tedbow) to take another look and weigh in before commit.
Thanks/sorry,
-Derek
Comment #55
volegerThanks for the comment. I reviewed the issue #332796: Add permissions to the update.module to hide warnings and agreed that it is important for handling update messages.
Adding commit with rerolled patch from #332796: Add permissions to the update.module to hide warnings makes it easy to test in scope to configure notification and introduce permissions simultaneously.
Comment #56
AnybodyMy 51% vote for
a) adding a permission
or
b) alternatively simply tying this to the "administer software updates" permission instead of "administer site configuration" ... (my favorite as it's simple and 99% use-case)
instead of my 49% for an additional setting ;)
but I think it's better to choose any of the options than to wait more years ;) @dww your word has enough weight here to finally decide it :)
Comment #57
volegerOk, I reverted the last 2 commit to keep the original scope. Turned back the previous issue name.
Cherry-picked permission-related commits to #332796: Add permissions to the update.module to hide warnings fork branch.
So we have two approaches to review.
Comment #58
AnybodyComment #59
AnybodyThank you very much @voleger for your great work on this. I've created a third - simpler - approach to be discussed: #3239970: Show update notifications only with permission "administer software updates" and added all three to the issue summary.
We now need feedback from the core maintainers which way they'd like to go. I like all three, the problem with THIS issue is, from my perspective, that it introduces a further setting which is possibly not even needed when using the "administer software updates" permission to show or not show the update notifications.
If core maintainers would like to keep this split, adding this setting is a good way and I'd vote for this (RTBC+1). Otherwise, I'd vote for the more simple #3239970: Show update notifications only with permission "administer software updates"
Comment #60
AnybodyComment #61
benjifisherUsability review
We discussed this issue at #3239070: Drupal Usability Meeting 2021-10-01. That issue has a link to a recording of the meeting.
We also reviewed the related issues listed in the issue description. A majority of the usability group preferred the solution in #332796: Add permissions to the update.module to hide warnings, and we had consensus that this behavior should be tied to a permission, not a single option.
We recommend closing this issue as a duplicate, but I leave that to the people who have been working on the three issues.
Comment #62
AnybodyThank you @benjifisher,
if it's ok for @voleger I'll now close this issue as duplicate as suggested. We'll have to chose one of the three options and if there's consensus that another is better, let's proceed there :)
Comment #63
dwwSorry for the delays here. Circling back around. Upon further review/reflection, I agree with the UX team that #332796: Add permissions to the update.module to hide warnings is the best solution to this family of issues. That's the only one still open, so let's concentrate our effort there. Thanks!