Skip to:

Opened 5 years ago

Closed 5 years ago

#2687 closed defect (duplicate)

wp 4.0 - bbpress bug due to new wp4 treatment of ['s'] variable in wp-query affecting themes and plugins

Reported by: Robin W Owned by:
Milestone: Priority: high
Severity: normal Version: 2.5.4
Component: Component - Forums Keywords:


bbp_has replies and bbp_has_topics both set $default square-bracket 's' square-bracket to false if it is not a search

wp4.0 has an added fragment in wp-includes/query.php which says

can't see how to do code backtics - sorry

if ( isset( $this->querys? ) ) {

$this->is_search = true;


This is a change from !empty

This now causes wp4 to tell themes and plugins that a search is true when it isn't.

The author summary near the end of this link gives a really good explanation of what's happening

Plugins from s2member, search exclude and relevanssi have had to change their coding to cope with this.

However this also seems to be affecting themes, and given the number out there, it is perhaps unreasonable to expect them all to have the bbpress skill to change code.

I tried adding (can't see how to backtick code in trac ticket

`FIX to unset 's'

if ($defaults? == False) unset ($defaults?) ;`

into a filter of bbpress_has_topics and bbpress_has_replies, but this only had partial success, and caused one theme to display the same latest topic all over!

This is all way beyond my knowledge, but it does seem like bbpress should be looking at ceating a fix, but without knowing why you need to set it false, I am stumped on how to progress.

Change History (2)

#1 @netweb
5 years ago

Edit: Wrong ticket

Last edited 5 years ago by netweb (previous) (diff)

#2 @netweb
5 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks Robin, we have fixed this is #2607

Duplicate: #2607

Note: See TracTickets for help on using tickets.