Notificar al administrador cuando las configuraciones del sitio sean actualizadas por el sistema

We recently had our download_remote_images_to_local disabled by system as s ‘silent’ change. As a site owner, it would have been useful to receive a DM about this. I’m not sure if there are more changes that can be updated by system like this though.

6 Me gusta

I’ve seen that happen when the disk is full. Was it that or something else?

2 Me gusta

It wasn’t full, just going below the threshold we set for downloading remote images.

3 Me gusta

I think the suggestion is reasonable, unfortunately I do not think we will have time to work on this for quite a while.

Placing a pr-welcome on it in case anyone in the community wants to investigate this. (A PM to admins when we fiddle with the setting)

5 Me gusta

The “system” broke our site by changing the default trust level to “0” when we had set it to be “1”.

It is very surprising that the system can make ad hoc changes to our production site without any kind of approval or notice and we need to prevent this from happening again in the future.

Is there any way to disable these automatic system changes?

This should not happen, plenty of sites have default of TL1. We need more context, can you open a new topic about this.

3 Me gusta

So it turns out that this happened due to bootstrap mode on a new server/app that we were setting up.

But my message was less about this specific system change and more about how any system change should ideally require approval so things don’t break. If approval isnt possible then at minimum an email notifying all admins about the change (which I think is more or less what the OP was asking after) would be great.

Thanks for all the work on Discourse!

1 me gusta

Hi @Earnie_Baird, this is great feedback.

I guess one suggestion would be to have more clarity on bootstrap mode, maybe when you see that on the header and click on it it should very clearly spell out what happened.

2 Me gusta

Unless there were changes I wasn’t aware of (and I don’t think there were), I strongly approve this feature request.

I’ve encountered this issue several times when temporarily lacking disk space.

Every single time, I noticed the setting was disabled only by chance. I didn’t think of looking at setting changes when I reach a disk space threshold, even after experiencing his multiple times.

I’m pretty sure there are many instances in the wild that have this setting disabled without the admin even knowing it, just because they ran out of disk space one year ago.

The setting change is logged in /admin/logs/staff_action_logs?filters=%7B"subject"%3A"download_remote_images_to_local"%7D, but I don’t remember ever getting any notification when it triggers.

Ideally, I’d like either at least a warning in the dashboard, a notification in the user menu, or an email.

The context of the following quote was quite specific (and old), but it also applies here.

An absence of any kind of notification when a setting is changed by @system can be detrimental.


When I notice download_remote_images_to_local has been disabled at some point, I run one of (or both, once) these rails scripts to trigger the download of remote files:

Rebake all posts from a given date

i = 0
Post.where('created_at >= ?', Date.new(2023, 5, 1)).where('user_id > 0').find_each do |post|
  post.rebake!
  puts "Post #{post.id}, Created at #{post.created_at}"
  i += 1
end

puts "Total number of posts rebaked: #{i}"

Rebake all posts between two given dates

i = 0
Post.where('created_at >= ? AND created_at < ?', Date.new(2021, 12, 1), Date.new(2022, 3, 1)).where('user_id > 0').find_each do |post|
  post.rebake!
  puts "Post #{post.id}, Created at #{post.created_at}"
  i += 1
end

puts "Total number of posts rebaked: #{i}"