#50796 closed enhancement (reported-upstream)
Call to a member function add_node() on string
Reported by: | malthert | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.4.2 |
Component: | Toolbar | Keywords: | |
Focuses: | Cc: |
Description
when using woocommerce beta tester, we get the following 2 notices in wp core.
core needs handling for this to avoid notices.
Call to a member function add_node() on string File: /wp-includes/admin-bar.php on line 921 Error URL: /wp-admin/post-new.php?post_type=page Referrer: /wp-admin/post.php?post=1494&action=edit Trace: #0 /wp-includes/class-wp-hook.php (287): wp_admin_bar_comments_menu( $wp_admin_bar = WP_Admin_Bar Object ) #1 /wp-includes/class-wp-hook.php (311): WP_Hook->apply_filters( $value = NULL, $args = Array( [0] => WP_Admin_Bar Object ) ) #2 /wp-includes/plugin.php (544): WP_Hook->do_action( $args = Array( [0] => WP_Admin_Bar Object ) ) #3 /wp-includes/admin-bar.php (97): do_action_ref_array( $tag = admin_bar_menu, $args = Array( [0] => WP_Admin_Bar Object ) ) #4 /wp-includes/class-wp-hook.php (287): wp_admin_bar_render() #5 /wp-includes/class-wp-hook.php (311): WP_Hook->apply_filters( $value = EMPTY STRING, $args = Array( [0] => ) ) #6 /wp-includes/plugin.php (478): WP_Hook->do_action( $args = Array( [0] => ) ) #7 /wp-admin/admin-header.php (245): do_action( $tag = in_admin_header ) #8 /wp-admin/edit-form-blocks.php (420): require_once( /wp-admin/admin-header.php ) #9 /wp-admin/post-new.php (72): require( /wp-admin/edit-form-blocks.php ) Warning: wp.data.select( "core/editor" ).getBlocks is deprecated. Please use wp.data.select( "core/block-editor" ).getBlocks instead. URL: /wp-admin/post-new.php?post_type=page File: /wp-includes/js/dist/deprecated.min.js?ver=224 Line: 2
Change History (9)
This ticket was mentioned in Slack in #core by sabernhardt. View the logs.
4 years ago
#3
@
4 years ago
- Keywords reporter-feedback 2nd-opinion added
- Type changed from defect (bug) to enhancement
#4
@
4 years ago
See https://github.com/woocommerce/woocommerce-beta-tester/releases/tag/2.0.1 for the plugin version that causes this error.
#7
@
2 years ago
There were multiple issues actually. It was fixed as of 2.0.2 https://github.com/woocommerce/woocommerce-beta-tester/releases
Note: See
TracTickets for help on using
tickets.
Another ticket about adding error handling (for a different error) was closed as won't-fix: #51894.
@malthert To move forward with this ticket:
$wp_admin_bar
with a type check (and maybe ending the function there if it's not an object). Would that work and/or is there a better way?