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.
Estou na versão 2.5.0.beta4, à qual cheguei após um processo de instalação padrão e executando as atualizações sugeridas.
Não sei como mudar para uma branch específica; além disso, isso parece arriscado, já que um dos poucos resultados de busca ao tentar descobrir como fazer isso foi de alguém que teve migrações de banco de dados falhas ao tentar isso.
Para esclarecer: no estado atual, ao carregar a página inicial, vejo “Novo (1)”. Ao clicar em “Novo (1)”, não vejo nenhuma nova postagem. Ao voltar para a página inicial, o “Novo (1)” desaparece. Ao recarregar a página, ele volta a aparecer.
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?
Vou lidar com o problema do explorador de dados mais tarde; não quero ficar reconstruindo o fórum e tirando-o do ar toda vez. Vou apenas executar as consultas na linha de comando.
Ok, isso é interessante. Você consegue navegar até o tópico 31? Há algo de estranho nele? Esse é um tópico não lido (last_read_post_number é 3)… a consulta indica que achamos que você tem 3 novos e 1 não lido.
Fico pensando se talvez algo esteja acontecendo no lado do cliente para você com o cache do web worker.
Você está no Chrome ou Firefox… consegue tentar o outro… consegue tentar seu navegador em modo anônimo sem extensões?
Oh @martin, acabamos de descobrir um bug… Por acaso, você está silenciando alguma tag?
Existe um bug onde as contagens ficam incorretas se você tiver tags silenciadas e QUALQUER tópico que seja 100% sem tags; eles acabam faltando na lista de não lidos.