LeoMcA
(Leo McArdle)
Mai 11, 2018, 3:52
1
I have #feature:announcements set to Watching , but for the past 3 or so sets of release notes (like this one ) I haven’t received a notification for it, and have only found it in my New list.
Once I open the topic, it says that it is set to Watching , despite my not receiving a notification for it.
5 « J'aime »
david
(David Taylor)
Mai 11, 2018, 4:15
2
I would guess that the post is being drafted either as a PM or a ‘shared draft’, and therefore notifications are not being sent. See here:
On my dev instance I just tried these steps:
User1 sets “Announcements” category to “Watching”
User2 performs these actions:
Private message (publish timer)
Create a private message with self, set timer to publish to “Announcements”
Staff only topic (publish timer)
Create a topic in a staff only category, set timer to publish to “Announcements”
Private message (manual publish)
Create a private message with self, click Make Public Topic (screenshot here)
This creates a public “Unc…
and more recently here:
I think this is the same issue discussed here:
I wonder if this also applies to publishing topics created using the shared drafts feature…
It looks like @tgxworld applied a related fix here
I just tried a few things locally:
Watching announcements
“Make PM Public”, then recategorise to announcements
No notification received
Watching #annoucements
“Publish shared draft”
Notification received
Watching first post announcements
“Publish shared draft”
Notification not received
10 « J'aime »
jomaxro
(Joshua Rosenfeld)
Mai 11, 2018, 4:32
3
@david very likely has the right idea. The last 3 or so release notes were created using the shared drafts feature. Previous notes were drafted elsewhere and posted “normally”. It looks like @tgxworld ’s recent change likely fixed watching #feature:announcements , but we should probably fix the other 2 issues.
10 « J'aime »
sam
(Sam Saffron)
Mai 13, 2018, 11:27
4
@tgxworld I would like you to fix this, this week if you have some time
A minimal fix here is that if a topic with 1 post is recategorized to a “watching” category notifications should go out.
It is a bit tricky here cause, what happens when you move something to #feature:announcements and then move it out of #feature:announcements ? We need to remove the watching status from all the people to be “correct”
1 « J'aime »
There is also the two full seconds of 307 SQL commands that somehow issue when you rename and recategorize a topic.
2 « J'aime »
tgxworld
(Alan Tan)
Mai 17, 2018, 8:17
7
@david Was this not working for you even with FIX: Retrigger notification when a topic is recategorized. · discourse/discourse@ee1eb1a · GitHub applied?
david:
Watching first post Announcements
“Publish shared draft”
Notification not received
This case is fixed in
committed 08:15AM - 17 May 18 UTC
https://meta.discourse.org/t/not-receiving-notifications-for-announcements/87275… /2?u=tgxworld
I tested this locally and it looks we we already do this.
4 « J'aime »
david
(David Taylor)
Mai 17, 2018, 8:31
8
I just tried again and this works fine, so I must have messed something up when testing. Sorry for the confusion!
3 « J'aime »
tgxworld
(Alan Tan)
Mai 17, 2018, 8:33
9
No worries! Thank you for working out the 3 scenarios!
1 « J'aime »
LeoMcA
(Leo McArdle)
Juin 27, 2018, 11:03
12
Unfortunately it doesn’t look like this is completely fixed, as it happened again for me with: Discourse 2.1.0 beta 2 Release Notes (I got no notification, only appeared in New, appeared as Watching once I opened it)
3 « J'aime »
I’m 80% sure this has to do with posting as a ‘shared draft’, perhaps?
I’ve recently merged a new feature into Discourse called Shared Drafts. The feature is meant for forums where staff members want to work on drafts together before publishing them.
How to Enable
Go into your site’s settings and designate a category as shared drafts category:
[Screenshot 2023-07-17 at 7.29.25 PM]
You can use the staff category that comes with Discourse to do this, or you can use a new category if you prefer. Make sure that the category is restricted to those who want to view a…
3 « J'aime »
sam
(Sam Saffron)
Juillet 17, 2018, 4:53
15
@david can you have a look at the shared draft case?
5 « J'aime »
david
(David Taylor)
Juillet 18, 2018, 9:14
16
It looks like most of the cases described above regressed 2 months ago, but this wasn’t picked up in the tests (because Sidekiq jobs don’t run normally in a test environment). Here’s a PR to fix:
master ← transaction-sidekiq-fix
merged 09:44AM - 24 Jul 18 UTC
Fix for https://meta.discourse.org/t/not-receiving-notifications-for-announcemen… ts/87275/15
It turns out all of the cases in that topic have regressed since 71f66cd (@ZogStriP). Moving the notification stuff into a Sidekiq job introduced a race condition. If the Sidekiq job runs before the database transaction has been committed, then it fails.
This was not picked up by tests because scheduled jobs are run immediately and in the current thread (and therefore within the current database transaction).
This particular case sometimes occurs inside multiple nested transactions, so simply moving the offending line outside of the transaction is not enough.
I've implemented `TransactionHelper`, which allows us to use `TransactionHelper.after_commit`
to define code to be run after the current transaction has been committed.
(Slightly adapted version of https://dev.to/evilmartians/rails-aftercommit-everywhere--4j9g)
If anyone has an easier/better way, please let me know!
12 « J'aime »
david
(David Taylor)
Juillet 24, 2018, 10:07
17
This is now merged, so future #feature:announcements should trigger notifications correctly
12 « J'aime »
david
(David Taylor)
A fermé ce sujet ()
Août 7, 2018, 5:00
18
This topic was automatically closed after 14 days. New replies are no longer allowed.