Moin
May 15, 2024, 10:59am
1
I noticed that the read time shown at some topics seems very high compared to the number of posts.
For example, there is only one post at the Custom Wizard Plugin đ§ topic, but the read time is more than 3 hours.
Are deleted posts included when the read time is calculated?
5 Likes
pmusaraj
(Penar Musaraj)
May 15, 2024, 12:52pm
2
Hah, yeah, I donât think you need a full 3 hours to read that topic. Good attentive eye!
6 Likes
Looking at https://meta.discourse.org/t/custom-wizard-plugin/73345.json ⊠the posts_count
there is correctly 1
⊠but the word count is 95026
â looks like this isnât being updated when replies are deleted.
I also notice that there are 31 links listed⊠so those are coming through deleted replies as well.
7 Likes
sam
(Sam Saffron)
May 16, 2024, 7:18am
6
Oh my⊠this is a double bug:
def update_topic_word_counts
DB.exec(
"UPDATE topics
SET word_count = (
SELECT SUM(COALESCE(posts.word_count, 0))
FROM posts
WHERE posts.topic_id = :topic_id
)
WHERE topics.id = :topic_id",
topic_id: @topic.id,
)
end
Post Revisor is not excluding posts with deleted_at not null
And Post Destroyer does nothing: discourse/lib/post_destroyer.rb at 45abb67f432bd009ca1bfef3e7735e632a4299fd · discourse/discourse · GitHub
So there is no workaround here even.
We will sort it out
3 Likes
zogstrip
(RĂ©gis Hanol)
Closed
May 20, 2024, 6:00am
12
This topic was automatically closed after 2 days. New replies are no longer allowed.