Skip to:
Content

bbPress.org

Opened 6 years ago

Closed 4 years ago

Last modified 8 months ago

#2494 closed defect (fixed)

Changing topic status might not spam/unspam replies

Reported by: johnjamesjacoby Owned by:
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.1
Component: API - Moderation Keywords:
Cc:

Description (last modified by johnjamesjacoby)

Clicking the spam link works correctly, but I have a hunch just changing the status of a topic will not mark the replies of that topic, since bbp_toggle_topic_handler() is not hooked to that action.

Change History (12)

#1 @johnjamesjacoby
6 years ago

  • Description modified (diff)

#2 @johnjamesjacoby
5 years ago

In 5406:

Split secondary topic spam/trash/unspam/untrash actions into separate functions to be used during topic status transition. See #2494.

#3 @johnjamesjacoby
5 years ago

In 5407:

Add phpdoc to bbp_trash_topic_replies() from r5406. See #2494.

#4 @johnjamesjacoby
5 years ago

In 5408:

Abstract new topic-transition reply helper-functions onto action hooks for easier testing and replacement/extension by third party plugins. See #2494.

#5 @netweb
5 years ago

What I've come up with so far...

Trashing and restoring topics

  • PHPDoc ref to bbp_sticked_topic in bbp_stick_topic() that needs to be updated to bbp_stuck_topic
  • Trashed replies missing bbp_reply_admin_links()
  • Verbiage Untrashing should be Restoring
  • After trashing a topic with 5 replies, topic header This topic contains 4 replies (+ 5 hidden), has 1 voice, and was last updated by admin 22 hours, 18 minutes ago. is not accurate.
  • ERROR: There was a problem untrashing the topic. <- This notice should be at the top of the page rather than a notice at the bottom the page where it is easily missed.
  • After restoring a trashed topic meta key _bbp_pre_trashed_replies should be removed
  • After restoring a trashed topic with 5 replies This topic contains 1 reply, has 1 voice, and was last updated by admin 22 hours, 22 minutes ago. is not accurate.

  • Trashing a topic correctly trashes the topics replies
  • Deleting a trashed topic correctly deletes the topic and trashed replies
  • Restoring a trashed topic correctly restores the topics replies

Trashing and restoring a single reply

  • Reply post meta key _wp_trash_meta_status = publish added
  • Reply post meta key _wp_trash_meta_time = 1402971584 added
  • Trashed reply includes bbp_reply_admin_links() as expected (see above)
  • Trashing a single reply keeps accurate topic header counts for replies and/or hidden replies

Will test more of the above and spam/unspam tomorrow...

#6 @johnjamesjacoby
5 years ago

In 5410:

Correct bbp_stuck_topic phpdoc. See #2494.

#7 @johnjamesjacoby
5 years ago

In 5411:

Delete trashed and spam topic-meta when performing untrash or unspam actions. Hat tip netweb. See #2494.

#8 @johnjamesjacoby
5 years ago

In 5412:

Add some missing brackets. See #2494.

#9 follow-up: @netweb
5 years ago

A couple more things here:

  • When unspamming a topic the topics replies should also be restored
    • (they are correctly trashed when the topic is marked as spam)
  • When unspamming, spamming, trashing or restoring a trashed single topic, a post revision are created for the topic and each reply
  • When unspamming, spamming, trashing or restoring a trashed single reply, a post revision is created for the reply

#10 @netweb
4 years ago

In 5931:

Tests: Add topic and topic reply spam/unspam tests test_bbp_spam_topic(), test_bbp_spam_topic_replies(), test_bbp_unspam_topic(), and test_bbp_unspam_topic_replies()

Props netweb. See #2494.

#11 in reply to: ↑ 9 @netweb
4 years ago

  • Keywords needs-testing removed
  • Resolution set to fixed
  • Status changed from new to closed

Replying to netweb:

  • When unspamming a topic the topics replies should also be restored

Could not reproduce, r5931 adds tests confirming this works as expected.

Marking this is as fixed now, post revisions can be addressed in a broader sweep in a future release.

#12 @johnjamesjacoby
8 months ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

Note: See TracTickets for help on using tickets.