Tutte le email disabilitate dopo il ripristino del backup?

I wanted to do some testing with Discourse so I took a backup of my instance, wiped the DB (rm -fr /var/discourse/shared) and rebuilt the container.

I then created an admin user again and instead of following the setup wizard I went straight to admin, enabled restores, uploaded the backup and restored.

For whatever reason the outgoing email is disabled by an administrator message appeared.

I can confirm that the outgoing email was never disabled on the instance where the backup was made.

I did tick the option to enable readonly mode when performing backup operations.

Is this a bug or did I mess up somewhere?

2 Mi Piace

Dovresti visualizzare questo messaggio solo per un breve periodo. Dovrebbe scomparire una volta terminato il ripristino, a patto che le email in uscita non siano state disabilitate al momento della creazione del backup. Se la notifica non scompare automaticamente, prova ad aggiornare la pagina nel tuo browser.


Lo lascio come Contribute > Bug, perché il modo in cui attualmente disabilitiamo le email in uscita prima del ripristino è piuttosto inutile. Sidekiq viene disabilitato durante il ripristino, quindi non può accadere nulla in quel lasso di tempo. Inoltre, il ripristino sovrascrive il valore dell’impostazione disable_email. Correggere il bug richiederebbe di modificare l’impostazione del sito dopo il ripristino.

@eviltrout Hai aggiunto questo codice in When restoring a backup, disable emails. · discourse/discourse@ccf9b70 · GitHub. Qual è la tua opinione? Dovremmo correggere il bug o rimuovere il codice? Secondo me, modificare un’impostazione del sito dopo il ripristino sarebbe piuttosto inatteso, quindi opterei per la rimozione. Inoltre, nessuno si è lamentato di questo problema in quasi 3 anni… :wink:

3 Mi Piace

I think the idea was that when a restore finishes the administrator might want to poke around and make sure everything is OK. Right now emails will start going out the second it finishes and the site might not be “approved.”

4 Mi Piace

So therefore this is not a bug @gerhard

Maybe Discourse should make it a bit more clear to the admin (e.g. entry inserted in the backup log panel). The site setting for disable_emails is set to no while the message renders and this is confusing (admin panel says disable emails is off while the message on the top of the screen still says its disabled)

Well, I consider it a bug when a line of code doesn’t do what it’s supposed to do. :wink: Anyway, it’s fixed: FIX: Outgoing emails were not disabled after restoring backup · discourse/discourse@dc961fe · GitHub

I made a small adjustment, because I think it’s better to disable outgoing emails only for non-staff users instead of all of them.

7 Mi Piace

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.