#2043 closed defect (bug) (fixed)
Last Post ignores post status
Reported by: | Clorith | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Support Forums | Keywords: | |
Cc: |
Description
The "Last Post" column on the forums shows when there was last a reply on a topic.
It does ignore the post status though, so if a post is caught in the Spam or Pending queues the post time from that reply is still displayed even if the user doesn't have access to view queued posts
Attachments (4)
Change History (25)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
8 years ago
Replying to netweb:
Note: The 3 replies, and 2 participants are due to extra instances of replies previously having been removed without counts being updated.
The sidebar also doesn't show the +X hidden
link, probably for the same cause?
#3
in reply to:
↑ 2
;
follow-up:
↓ 4
@
8 years ago
Replying to SergeyBiryukov:
The sidebar also doesn't show the
+X hidden
link, probably for the same cause?
No, this is actually because the custom "Archive" status added here on w.org, as such the ?view=all
has not been added to take into account this custom status, we'll add that as part of #1984
#4
in reply to:
↑ 3
@
8 years ago
Replying to netweb:
No, this is actually because the custom "Archive" status added here on w.org, as such the
?view=all
has not been added to take into account this custom status, we'll add that as part of #1984
#1984 is about the UI, while this is a functionality issue. Created a separate ticket for that: #2171.
#6
@
8 years ago
- Keywords needs-patch added; has-patch removed
Thanks @denisco, the pagination should account for both moderators and normal users, each user should see the correct number of replies per page based on their role.
I've a feeling bbPress core might need to be patched to fix this, the custom post status archive
touches many things
#7
@
8 years ago
@netweb sorry, but I do not understand your answer in relation to this the ticket.
Position of latest reply gets from meta "menu_order" of topic and bbPress has bbp_update_topic_walker() for update this meta value.
But this walker is currently disabled for performance reasons on the wordpress.org/support forums.
"Last Post" working incorrect if topic has any hidden replies such as spam, pending or archived because meta "menu_order" not updating when reply marked as spam or pending or archived.
If you have the possibility, could you please explain more fully how you see the solution to the problem of this ticket. Thank you for your time.
#8
follow-up:
↓ 10
@
8 years ago
To summarize, the issue is that some topic metadata (_bbp_last_reply_id
, _bbp_last_active_id
, _bbp_last_active_time
, _bbp_reply_count
) is missing or inaccurate since bbp_update_topic_walker()
was disabled for performance reasons in [3898].
Looks like there are three potential options:
- Use available bbPress hooks to work around the issues caused by inaccurate metadata.
- Find a way to update the necessary metadata without using
bbp_update_topic_walker()
. - Investigate and resolve
bbp_update_topic_walker()
performance issues mentioned in [3898].
The correct long-term solution is probably option 2 or 3.
2043.2.patch implements option 1, just to get the ball rolling:
- For non-moderators, if the topic has hidden replies, the last reply link, last activity time, last post author, and pagination links all properly account for that.
- For moderators, those links have
view=all
appended to them, so when you open the link, hidden replies are displayed as expected.
This adds a few SQL queries on the front end, hopefully less expensive than bbp_update_topic_walker()
. I only tested the patch on a small install though.
This ticket was mentioned in Slack in #bbpress by netweb. View the logs.
8 years ago
#10
in reply to:
↑ 8
@
8 years ago
Replying to SergeyBiryukov:
For moderators, those links have
view=all
appended to them, so when you open the link, hidden replies are displayed as expected.
On second thought, that part probably belongs more in #1984 or #2171. Removed in 2043.3.patch.
This ticket was mentioned in Slack in #bbpress by netweb. View the logs.
8 years ago
This ticket was mentioned in Slack in #forums by sergey. View the logs.
8 years ago
#13
@
8 years ago
Triggered the incorrect replies counts issue recently a couple of times:
- Reply to a topic that had no replies, it has 1 reply now.
- Edit your reply to fix a typo or something.
- Akismet didn't flag the initial post, but flags the edited one for some reason, without updating the replies count.
- Once you unspam the post, the topic has 2 replies (+ -1 hidden).
Confirmed.
For example the topic https://wordpress.org/support/topic/forum-bugs-and-broken-things/
I just posted a reply to the above topic, after "archiving" the reply the current topic stats are:
Note: The 3 replies, and 2 participants are due to extra instances of replies previously having been removed without counts being updated.
All of which are incorrect, the fix is to after spamming, unapproving, trashing, or archiving a reply in a topic is to allow the appropriate action e.g.
bbp_spammed_topic
to callbbp_update_topic_walker()
, this is standard bbPress behavior but is currently disabled for performance reasons on the wordpress.org/support forums siteSee wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php#L12
See wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php#L187
See wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-dropin.php#L305