I am running a week-old very small forum, just updated to the current version, and I am still seeing this very strange behavior. The notification counts (New, etc) do not appear to correspond to any real counts, and change at random.
Nothing muted, and this has continued to happen even with new activity in the forum. Feel free to make an account if you’d like to see it first-hand. (I haven’t actually confirmed if other people see this or if it’s unique to my account.)
Are you running cloudflare or a similar CDN. I’ve noticed some notification latency with cloudflare, even with the acceleration turned off. Rocket loader for example.
Oh I missed this… so something is consistently wrong. This means the server is telling the client there are a bunch of new topics, but then when you drill in they are missing.
I have seen this happen before with scheduled posts … do you use them? Debugging this is a bit tricky, we need to get the list of topic_ids the client thinks are new
If this is happening now run:
SELECT
u.id AS user_id,
topics.id AS topic_id,
topics.created_at,
highest_staff_post_number highest_post_number,
last_read_post_number,
c.id AS category_id,
tu.notification_level
FROM topics
JOIN users u on u.id = 1
JOIN user_stats AS us ON us.user_id = u.id
JOIN user_options AS uo ON uo.user_id = u.id
JOIN categories c ON c.id = topics.category_id
LEFT JOIN topic_users tu ON tu.topic_id = topics.id AND tu.user_id = u.id
LEFT JOIN category_users ON category_users.category_id = topics.category_id AND category_users.user_id = 1
WHERE u.id = 1 AND
topics.archetype <> 'private_message' AND
((1=0) OR ("topics"."deleted_at" IS NULL AND topics.created_at >= GREATEST(CASE
WHEN COALESCE(uo.new_topic_duration_minutes, 2880) = -1 THEN u.created_at
WHEN COALESCE(uo.new_topic_duration_minutes, 2880) = -2 THEN COALESCE(u.previous_visit_at,u.created_at)
ELSE ('2020-05-13 00:36:29.100619'::timestamp - INTERVAL '1 MINUTE' * COALESCE(uo.new_topic_duration_minutes, 2880))
END, us.new_since, '2020-05-07 14:46:17') AND tu.last_read_post_number IS NULL AND COALESCE(tu.notification_level, 2) >= 2 AND topics.created_at > '2020-05-07 14:46:17' AND (category_users.last_seen_at IS NULL OR topics.created_at > category_users.last_seen_at))) AND
topics.deleted_at IS NULL AND
NOT (
last_read_post_number IS NULL AND
COALESCE(category_users.notification_level, 1) = 0
)
UNION ALL
SELECT
u.id AS user_id,
topics.id AS topic_id,
topics.created_at,
highest_staff_post_number highest_post_number,
last_read_post_number,
c.id AS category_id,
tu.notification_level
FROM topics
JOIN users u on u.id = 1
JOIN user_stats AS us ON us.user_id = u.id
JOIN user_options AS uo ON uo.user_id = u.id
JOIN categories c ON c.id = topics.category_id
LEFT JOIN topic_users tu ON tu.topic_id = topics.id AND tu.user_id = u.id
LEFT JOIN category_users ON category_users.category_id = topics.category_id AND category_users.user_id = 1
WHERE u.id = 1 AND
topics.updated_at >= us.first_unread_at AND
topics.archetype <> 'private_message' AND
(("topics"."deleted_at" IS NULL AND tu.last_read_post_number < topics.highest_staff_post_number AND COALESCE(tu.notification_level, 1) >= 2) OR (1=0)) AND
topics.deleted_at IS NULL AND
NOT (
last_read_post_number IS NULL AND
COALESCE(category_users.notification_level, 1) = 0
)
replacing user_id = 1 with your user id (you can find it by running select id, username from users where username = 'yourusername')
If this is happening can you install data explorer and see what is going on.
I’m on 2.5.0.beta4, which I ended up at after a stock install process and running the prompted upgrades.
I don’t know how to switch to a specific branch, also that sounds risky given that one of the only search results when trying to find out how was someone who had some failed database migrations trying to do that.
To clarify, right now in the current state, when I load the home page I see “New (1)”, clicking on “New (1)” I do not see any new posts. Clicking back to the home page the “New (1)” goes away. Reloading the page makes it show up again.
Oh right, sorry, can you confirm data explorer is still broken after you enable it on site settings? Also can you try in a different browser (Firefox/chrome) does the work box error persist?
I’m going to deal with the data explorer issue later, I don’t want to keep rebuilding the forum taking it down every time. I’ll just run the queries on the command line.
Ok this is interesting, can you navigate to topic 31, is there something odd about it? That is a unread topic (last_read_post_number is 3) … the query indicates we think you have 3 new and 1 unread.
I keep thinking maybe something is going on client side for you with web worker caching.
Are you on Chrome or Firefox … can you try the other one… can you try your browser in incognito with no extensions?