Opened 2 weeks ago
Closed 2 weeks ago
#3675 closed defect (bug) (fixed)
Theme compatibility misidentifies classic themes with block-template support
| Reported by: | johnjamesjacoby | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 2.6.16 |
| Component: | Appearance - Theme Compatibility | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Changeset r7394 for #3487 uses current_theme_supports( 'block-templates' ) to decide whether bbPress should load WordPress's template-canvas.php.
WordPress enables that theme-support flag for any theme that includes theme.json, including classic PHP themes. As a result, a classic theme with theme.json skips its bbpress.php template and is rendered through the Block Theme canvas.
Steps to reproduce
- Activate a classic PHP theme that includes
theme.jsonand abbpress.phptemplate. - Visit a bbPress archive or single forum.
- Observe that bbPress selects
wp-includes/template-canvas.phpinstead of the theme'sbbpress.php.
Expected result
Only true Block Themes use the WordPress canvas. Classic, hybrid, and classic child themes continue through normal bbPress theme compatibility.
wp_is_block_theme() is the correct capability check and has existed since WordPress 5.9; bbPress currently requires WordPress 6.0. BuddyPress fixed the same regression in #BP8757 (r13350/r13351).
The fix should include regression coverage for classic themes, classic themes with theme.json, themes with bbpress.php, classic child themes, Block Themes, and Block child themes. This did not ship in bbPress 2.6.15; the 2.6.16 work is a corrected backport of the feature.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Fixed in [7424] and [7425].
I corrected the SVN log revision properties afterwards to replace escaped line-feeds with real ones from an IDE mishap.