[wp-trac] [WordPress Trac] #63086: Customizer: notice errror regarding WP_Theme::is_block_theme

WordPress Trac noreply at wordpress.org
Wed Mar 19 11:52:42 UTC 2025


#63086: Customizer: notice errror regarding WP_Theme::is_block_theme
-------------------------------------------------+-------------------------
 Reporter:  wildworks                            |       Owner:  joemcgill
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.8
Component:  Customize                            |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-testing-info dev-feedback        |     Focuses:
  needs-testing has-patch                        |
-------------------------------------------------+-------------------------

Comment (by AddWeb Solution Pvt. Ltd.):

 Test Environment:
         WordPress Version: 6.8
         Theme: Custom Child Theme (with Twenty Twenty-Five installed)
         Plugin: Adhoc MU-Plugin for wp_is_block_theme() Detection


 Test Scenario

     Create and Install Adhoc Plugin
         The plugin checks the result of wp_is_block_theme() at different
 execution stages.
         Install it as a must-use (mu-plugin) in wp-content/mu-plugins/.

     Install and Activate Custom Child Theme
         Ensure Twenty Twenty-Five is installed alongside the child theme.
         Activate the child theme.
         The theme should load without any issues.

     Verify Customizer Behavior
         Navigate to Appearance → Customize.
         Ensure no notices appear.

     Test Shortcode Execution
         Add [block_theme_detection] shortcode to a post.
         View the post and verify if the function passes through all action
 hooks.

 Expected Result

     The function wp_is_block_theme() should return correct values at each
 step.
     No notices should appear in the Customizer.
     The shortcode should execute correctly in all action hooks.

 Actual Result (Before Patch)

     Error Notice: WP_Theme::is_block_theme() called incorrectly.
     The function did not return the expected values in all cases.
     The error appeared in both Customizer and shortcode execution.

 Result (After Patch Applied)

     The function WP_Theme::is_block_theme() works correctly.
     No PHP notices in Customizer or on the frontend.
     The shortcode successfully detects the theme status at each action
 hook.

 Attachments

  https://prnt.sc/BUlXbmss3yIC
  https://prnt.sc/LcTKsQCs5Be5
  https://prnt.sc/zXGw4LQ2NuoX


 Test Conclusion

     Status: ✅ Issue Resolved After Patch
     Impact: Medium (Affects theme detection logic and compatibility)
     Recommendation:
         Ensure the patch is included in future releases.
         Verify compatibility with upcoming WordPress versions.
         Perform additional testing with other child themes and FSE themes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63086#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list