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.

32.png

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.

33.png

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)

CommentFileSizeAuthor
#49 After_apply_patch.png218.59 KBvikashsoni
#49 Before_apply_patch.png209.33 KBvikashsoni
#44 interdiff-2059375-35-MR.txt866 bytesvoleger
#41 2059375-41.patch5.43 KBjoaopauloscho
#40 2059375-40.patch3.79 KBjoaopauloscho
#35 interdiff-2059375-32-35.patch446 bytesvoleger
#35 2059375-35.patch5.99 KBvoleger
#33 Screenshot from 2019-04-02 16-46-52.png13.82 KBvoleger
#33 Screenshot from 2019-04-02 16-46-39.png14.24 KBvoleger
#32 interdiff-2059375-23-32.txt3.77 KBvoleger
#32 2059375-32.patch5.96 KBvoleger
#23 update_notification-2059375-23.patch3.32 KBXilis
#20 update_notification-2059375-20.patch3.33 KBwturrell
#17 update_notification-2059375-17.patch3.32 KBalesr
#14 update_notification-2059375-14.patch3.38 KBalansaviolobo
#6 update-module-notifications-settings-d8-2059441-6.patch3.76 KBalesr
#6 interdiff.txt1.32 KBalesr
#4 update-module-notifications-settings-d8-2059441-4.patch3.76 KBalesr
#2 update-module-notifications-settings-d8-2059441-2.patch3.62 KBalesr
#1 update-module-notifications-settings-2059375-1.patch1.27 KBalesr
Screenshot from 2013-08-07 13:05:33.png41.5 KBalesr
Screenshot from 2013-08-07 13:00:32.png17.64 KBalesr

Issue fork drupal-2059375

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alesr’s picture

Status: Active » Needs review
FileSize
1.27 KB

A 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.

alesr’s picture

Version: 7.x-dev » 8.x-dev
FileSize
3.62 KB

A patch from #1 is for Drupal 7.
Here is a patch for Drupal 8, which I hope will be backported to D7.

damiankloip’s picture

+++ b/core/modules/update/lib/Drupal/update/UpdateSettingsForm.phpundefined
@@ -44,6 +44,12 @@ public function buildForm(array $form, array &$form_state) {
+      '#title' => t('Enable Update module system notifications'),
+      '#default_value' => $config->get('check.update_system_notifications'),

Do you think we could do with a description here too? Maybe this is a question for the UX guys.

+++ b/core/modules/update/update.moduleundefined
@@ -99,7 +99,7 @@ function update_help($path, $arg) {
+  if (arg(0) == 'admin' && user_access('administer site configuration') && config('update.settings')->get('check.update_system_notifications')) {

Can we use the method on the Drupal class instead please. i.e. Drupal::config('update.settings')

alesr’s picture

New patch with changes from #3 included.

Status: Needs review » Needs work

The last submitted patch, update-module-notifications-settings-d8-2059441-4.patch, failed testing.

alesr’s picture

Status: Needs work » Needs review
FileSize
1.32 KB
3.76 KB

Fixed patch with added interdiff.txt.

slashrsm’s picture

Status: Needs review » Needs work
@@ -145,6 +145,7 @@ function _update_requirement_check($project, $type) {
+    'update_system_notifications' => 'check.update_system_notifications',

This 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.

alesr’s picture

Status: Needs work » Needs review

slashrsm, 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.

slashrsm’s picture

I 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:

Messages about available updates will not be displayed if this checkbox is unchecked. Disabling it may have security implications.

alesr’s picture

Issue summary: View changes

Edit

alesr’s picture

Issue summary: View changes

bolded

jetwodru’s picture

I 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

alesr’s picture

@jetwong98, that's exactly why the we need this option in configuration.

jetwodru’s picture

Will 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

alesr’s picture

It needs some attention of core committers.

alansaviolobo’s picture

Issue summary: View changes
FileSize
3.38 KB

reroll

mikey_p’s picture

Status: Needs review » Needs work
+++ b/core/modules/update/src/UpdateSettingsForm.php
@@ -52,6 +52,13 @@ public function buildForm(array $form, FormStateInterface $form_state) {
+      '#description' => t('Messages about available updates will not be displayed if this checkbox is unchecked. Checked by default.'),

I think we could probably use a more stern warning here and lose the message about the default value.

Leeteq’s picture

Issue tags: +Needs backport to D7
alesr’s picture

Rerolled #14 and fixed with #15.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wturrell’s picture

- Reroll for 8.2.x.
- URL of settings page added to issue summary.
- Probably needs tests.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Xilis’s picture

Status: Needs review » Closed (cannot reproduce)

Cannot 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).

Xilis’s picture

Security patches still show a warning message so I'm reopening and adding rerolled patch for 8.4.x.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

edurenye’s picture

Status: Needs review » Needs work

We must not have the warning message disabled by default, so we must add an update path to set that option to TRUE.

alesr’s picture

It is not disabled by default and "update_system_notifications" setting is already set to "true" if you check the patch.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

klonos’s picture

...or you can re-label and repurpose the checkbox, and make it "Hide system notifications about security updates" instead.

alesr’s picture

Status: Needs work » Needs review

(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.

voleger’s picture

Addressed #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.

voleger’s picture

Messages are showed, checkbox checked

Messages are hided, checkbox unchecked

Status: Needs review » Needs work

The last submitted patch, 32: 2059375-32.patch, failed testing. View results

voleger’s picture

Of course, immutable configs. Changed to editable.

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

andypost’s picture

+++ b/core/modules/update/update.install
@@ -163,3 +163,13 @@ function update_update_8001() {
+function update_update_8801() {
+  \Drupal::configFactory()
+    ->getEditable('update.settings')

Better move it to post update hook

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.

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.

joaopauloscho’s picture

Version: 9.2.x-dev » 8.9.x-dev
Issue tags: -Needs backport to D7
FileSize
3.79 KB

We'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.

joaopauloscho’s picture

Sorry, the right patch is this one.

ptmkenny’s picture

Version: 8.9.x-dev » 9.2.x-dev
Status: Needs review » Needs work

Patch in #41 didn't apply; also, all patches need to go to D9 first and apply to the dev branch, currently 9.2.x.

voleger’s picture

Addressed #37

Attached interdiff between the commit in MR and #35 after reroll against core 9.2.x

voleger’s picture

Updated the test

raman.b made their first commit to this issue’s fork.

Resolving deprecations

Pasqualle’s picture

Priority: Normal » Critical

As 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

xjm’s picture

Priority: Critical » Normal

This does not meet the criterial for a critical issue.

vikashsoni’s picture

FileSize
209.33 KB
218.59 KB

Apply 23.patch working fine and added Show Update module system notifications in update setting sharing the screenshot

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.

Anybody’s picture

RTBC+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:

As these messeges are the number 1 reason why update module is disabled

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!

bkosborne’s picture

Status: Needs review » Reviewed & tested by the community

Agreed. MR looks good to me.

voleger’s picture

Rerolled against 9.3.x
Looks good to go

dww’s picture

Thanks 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

voleger’s picture

Title: Update notification messages as an option in settings » New permission and an option in settings for update notification messages
Status: Reviewed & tested by the community » Needs review

Thanks 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.

Anybody’s picture

My 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 :)

voleger’s picture

Title: New permission and an option in settings for update notification messages » Update notification messages as an option in settings

Ok, 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.

Anybody’s picture

Issue summary: View changes
Anybody’s picture

Thank 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"

Anybody’s picture

benjifisher’s picture

Usability 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.

Anybody’s picture

Status: Needs review » Closed (duplicate)

Thank 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 :)

dww’s picture

Sorry 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!