Skip to:

Opened 5 years ago

Closed 5 years ago

#3246 closed defect (bug) (fixed)

Unapproved stickies still listed in forums

Reported by: bbrian's profile bbrian Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: high
Severity: minor Version: 2.5.14
Component: Component - Topics Keywords: needs-patch


If a sticky is unapproved, it does not remove it from the top of the forum's list of topics. Regular users can see the sticky title but reach a 404 page when trying to open it.

To reproduce:

$topic_id = <non-sticky test topic id>;

bbp_stick_topic( $topic_id, true );

bbp_unapprove_topic( $topic_id );

...then view the forum as a regular user to confirm the sticky is still listed.

I'm using bbp_unstick_topic( $topic_id ); after calling bbp_unapprove_topic() but this loses the historical context of the stickied post.

Version 2.6-rc-7.

Change History (2)

#1 @johnjamesjacoby
5 years ago

  • Component changed from General to Component - Topics
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high
  • Status changed from new to assigned

#2 @johnjamesjacoby
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 6915:

Stickies: make sure unapproved topics are unstuck also.

This commit removes a hard coded call to bbp_unstick_topic() and hooks into the neighboring bbp_stick_topic action, while also hooking into the bbp_unapprove_topic action.

A small bit of code clean-up and inline documentation additions accompany this commit, to improve a bit of the surrounding relevant code.

Fixes #3246.

Note: See TracTickets for help on using tickets.