Moin
2024 年5 月 15 日 10:59
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 个赞
pmusaraj
(Penar Musaraj)
2024 年5 月 15 日 12:52
2
Hah, yeah, I don’t think you need a full 3 hours to read that topic. Good attentive eye!
6 个赞
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 个赞
sam
(Sam Saffron)
2024 年5 月 16 日 07:18
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 个赞
zogstrip
(Régis Hanol)
关闭
2024 年5 月 20 日 06:00
12
This topic was automatically closed after 2 days. New replies are no longer allowed.