[FYI] How to turn off Update Nag Screens in both v10 and v11

Recently I tried using v11 for a client demonstration and found the constant nag screens (New Updates are available pop-up window) kept derailing my demo. So I asked the question about how to turn off those pop-up nag screens.

There was a lot of ‘push-back’ against doing this in my PM’s and direct emails, but I really needed to do this no matter the supposed problems. If you are facing a similar problem, I found there is a way to do this, but it requires editing 2 important files in the system.

So, be warned. If you take this approach, it will be overwritten if you update your system.

My reason for doing this is to stop the constant pop-up while I am using v10. I have no desire to update to v11 so the constant nag screens are undesirable.

Here is the post detailing how to comment our the lines that prompt the pop-up nags for v11 ERPNext:

.
The same 2 lines get edited in v10 but they are located in different directories. So to do the edits in v10 the first one is located at: (Note: use the ‘#’ character to comment this file)

~/frappe-bench/apps/frappe/frappe/hooks.py

The second file is located at: (Note: use the ‘//’ characters to comment this file)

~/frappe-bench/apps/frappe/frappe/public/js/frappe/desk.js

Then be sure to go back to the ~/frappe-bench directory and run:

bench build
bench restart

While not a recommended solution, it worked for me.

Your mileage may vary…

BKM

hi @bkm
how can we achieve this in custom app can you please guide?

Hi read somewhere it has been disabled in V12. Only system administrator would get the pop up.

hi @Muzzy
no, other users are still getting this popup on logging in.this is not admin.

I think anyone with “System” role gets the messages. I wish we could turn it off for all but administrator but we are not there yet.

BKM

In both v11 and 12, the update is only restricted to System Manager role, not Administrator:

Thank you for clearing the doubt is this same for update notes which comes after bench update ? and even if i want to remove how can we achieve in custom app @kennethsequeira

The changelog message is meant for system managers as well:

My previous comment was regarding the “New Updates Available” message.

There are two pop-ups related to update in Frappe

  1. “Updated To A New Version” popup which shows new features and fixes after an update
  2. “New Updates are available” pop up which shows possible updates for installed apps in your site

Both can be disabled in an upgrade safe manner by injecting the custom code below into a JS file which should be referenced in app_include_js of your custom app’s hooks.py

// Disables "Updated To A New Version" pop-up
frappe.Application.prototype.show_change_log = function () { };

// Disables "New Updates are available" pop-up
frappe.Application.prototype.show_update_available = function () { };

It would be nice, if there was an option to disable these pop-ups in the System Settings of Frappe

CC: @Muzzy @surajkumar

1 Like