Site Administration -> Notification settings - Deleting a block resets the preferences

Site Administration -> Notification settings - Deleting a block resets the preferences

by Acqua Alta -
Number of replies: 2

Hi,
I discovered the following issue while trying to use the "Notification settings" page in the "Site administration" area:

MDL-71911 Site Administration -> Notification settings - Deleting a block resets the notification settings

The title of the issue should give you the idea about the nature of the problem, but in it I supplised more information about it.

As I wrote inside this issue in Moodle Tracker website, DO NOT TRY TO REPRODUCE THIS SCENARIO ON A PRODUCTION ENVIRONMENT, OR EVEN A TEST ENVIRONMENT THAT YOU CAN'T RECOVER QUICKLY AND EASILY FROM A BACKUP, SINCE THIS SCENARIO WOULD PROBABLY END IN A LOSS OF DATA IN THE ENVIRONMENT.

I just want to bring this issue to the attention of people, so they wouldn't be affected by it while trying to do a simple action in the system.

If I'm missing something or if you can shed some light about this issue, that would be great.


Average of ratings: -
In reply to Acqua Alta

Re: Site Administration -> Notification settings - Deleting a block resets the preferences

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

I've posted some details of what I think is happening and a proposed patch for MDL-71911.

For the data loss: in my test this is restricted to the mdl_config_plugins table and only rows with name = 'message_provider_%'. So if you had a backup of the database from before this issue you may be able to extract just these values and apply them. If the database is MySQL or MariaDB then dump files are typically text which makes it easier to manipulate these to get only part of the data.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Site Administration -> Notification settings - Deleting a block resets the preferences

by Acqua Alta -
Hi Leon,
Thanks a lot for taking a look at it so quickly and efficiently.
I wrote a question in MDL-71911 a moment after you posted you comment, before being notified that you also replied here, so I deleted it now. Let's hope that deleting my comment didn't delete other data in the tracker issue 😜

Again, thanks a lot.