Skip to:
Content

bbPress.org

Opened 5 weeks ago

Closed 5 weeks ago

#3701 closed defect (bug) (fixed)

Explicit topic tag description uses an undefined filter tag

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6.20
Component: Component - Topic Tags Version: 2.6.0
Severity: normal Keywords:
Cc:

Description

Create a topic tag with slug alpha and a description, then call bbp_get_topic_tag_description( array( 'tag' => 'alpha' ) ) outside a topic-tag query. The description renders, but the function passes an uninitialized $tag to the bbp_get_topic_tag_description filter. This produces an undefined-variable warning and gives filters the wrong tag context.

Initialize the tag from the parsed arguments before resolving the term, while preserving the queried-term fallback. Add PHPUnit coverage for the explicit tag, description output, and filter arguments.

The bug is present in the bbPress 2.6.0 tag and branches/2.6. Fix in trunk and backport to branches/2.6 for 2.6.20. The broader topic-tag test work is tracked in #3695.

Change History (2)

#1 @johnjamesjacoby
5 weeks ago

In 7809:

Topic Tags: Respect explicit tags in edit links and descriptions.

Pass the resolved tag to edit-link generation for both permalink styles, and initialize the explicit tag before passing it to description filters. Add regression coverage for missing tags, output, permalink styles, and filter context.

In trunk, for 2.7.

See #3700.
See #3701.
See #3695.

#2 @johnjamesjacoby
5 weeks ago

  • Owner set to johnjamesjacoby
  • Resolution → fixed
  • Status new → closed

In 7810:

Topic Tags: Backport explicit tag fixes to 2.6.

Pass explicit topic tags to edit-link generation and description filters, with regression coverage for both behaviors.

In branches/2.6, for 2.6.20.

Fixes #3700.
Fixes #3701.

Note: See TracTickets for help on using tickets.