Skip to:
Content

bbPress.org

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#3415 closed defect (fixed)

Potential Bug using BBPress with Memberpress Courses

Reported by: lyndseyh Owned by: johnjamesjacoby
Milestone: 2.6.7 Priority: normal
Severity: normal Version: 2.6.0
Component: Appearance - Theme Compatibility Keywords: needs-patch
Cc:

Description (last modified by johnjamesjacoby)

Activating the Memberpress courses causes BBPress to fail with the following error when trying to access any forum

Fatal error: Uncaught ArgumentCountError: Too few arguments to function memberpress\courses\controllers\App::show_lock_icon(), 1 passed in /home/customer/www/vartic3d.com/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /home/customer/www/vartic3d.com/public_html/wp-content/plugins/memberpress-courses/app/controllers/App.php:583
Stack trace:
0 /home/customer/www/vartic3d.com/public_html/wp-includes/class-wp-hook.php(287): memberpress\courses\controllers\App->show_lock_icon('Forums')
1 /home/customer/www/vartic3d.com/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters('Forums', Array) 
2 /home/customer/www/vartic3d.com/public_html/wp-content/plugins/bbpress/includes/core/theme-compat.php(571): apply_filters('the_title', 'Forums') 
3 /home/customer/www/vartic3d.com/public_html/wp-includes/class-wp-hook.php(287): bbp_template_include_theme_compat('/home/customer/...') 
4 /home/customer/www/vartic3d.com/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters('/home/customer in /home/customer/www/vartic3d.com/public_html/wp-content/plugins/memberpress-courses/app/controllers/App.php on line 583

I have had the Memberpress team look at this and they say it is a problem with BBPress as per the following:-

The problem was not caused by "MemberPress Courses" but "BuddyBoss" plugin.
BuddyBoss calls apply_filters('the_title', 'Forums') without including the second argument as described here - https://developer.wordpress.org/reference/hooks/the_title/

Regards

Change History (7)

#1 @johnjamesjacoby
10 months ago

  • Component changed from General to Appearance - Theme Compatibility
  • Description modified (diff)
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6.7
  • Owner set to johnjamesjacoby
  • Priority changed from high to normal
  • Status changed from new to accepted
  • Version set to 2.6.0

#2 follow-up: @Robin W
10 months ago

'The problem was not caused by "MemberPress Courses" but "BuddyBoss" plugin'

which is not "bbpress" plugin :-)

presuming you have buddyBoss, then you need to raise it with them

#3 in reply to: ↑ 2 @johnjamesjacoby
10 months ago

Replying to Robin W:

presuming you have buddyBoss, then you need to raise it with them

BuddyBoss bundles bbPress and BuddyPress inside of it. They inherit all of the bugs and fixes from both, which means investigating it on the bbPress side of things is inevitable. I have a hunch this will be an easy fix, by simply adding the second parameter.

#4 @Robin W
10 months ago

ah I see !

#5 @johnjamesjacoby
10 months ago

In 7167:

Theme Compat: pass $page->ID into the_title filter inside bbp_template_include_theme_compat().

This commit fixes potential PHP notices and third-party plugin compatibility issues (specifically with MemberPress, but could be anything really) and ensures that the the_title filter parameters match what WordPress itself includes.

In trunk for 2.7.0. See #3415.

Props lyndseyh.

#6 follow-up: @johnjamesjacoby
10 months ago

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

In 7168:

Theme Compat: pass $page->ID into the_title filter inside bbp_template_include_theme_compat().

This commit fixes potential PHP notices and third-party plugin compatibility issues (specifically with MemberPress, but could be anything really) and ensures that the the_title filter parameters match what WordPress itself includes.

In branches/2.6 for 2.6.6. Fixes #3415.

Props lyndseyh.

Last edited 10 months ago by johnjamesjacoby (previous) (diff)

#7 in reply to: ↑ 6 @lyndseyh
10 months ago

Thanks johnjamesjacoby - glad it's an easy fix

Replying to johnjamesjacoby:

In 7168:

Theme Compat: pass $page->ID into the_title filter inside bbp_template_include_theme_compat().

This commit fixes potential PHP notices and third-party plugin compatibility issues (specifically with MemberPress, but could be anything really) and ensures that the the_title filter parameters match what WordPress itself includes.

In branches/2.6 for 2.6.6. Fixes #3415.

Props lyndseyh.

Note: See TracTickets for help on using tickets.