Error clicking on Code Block in display frame

Error during code edition:

TypeError: Cannot destructure property ‘frameElement’ of ‘r’ as it is null.
at je (http://localhost/wp-includes/js/dist/components.min.js?ver=0e6d68fb5b3f61d537b3d3411bddd6fc:23:57742)
at http://localhost/wp-includes/js/dist/components.min.js?ver=0e6d68fb5b3f61d537b3d3411bddd6fc:23:95711
at e (http://localhost/wp-includes/js/dist/components.min.js?ver=0e6d68fb5b3f61d537b3d3411bddd6fc:23:96077)
at http://localhost/wp-includes/js/dist/components.min.js?ver=0e6d68fb5b3f61d537b3d3411bddd6fc:23:97369
at ir (http://localhost/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9:65290)
at Br (http://localhost/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9:81796)
at unstable_runWithPriority (http://localhost/wp-includes/js/dist/vendor/react.min.js?ver=17.0.1:9:7431)
at xn (http://localhost/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9:29950)
at Ar (http://localhost/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9:78535)
at Pr (http://localhost/wp-includes/js/dist/vendor/react-dom.min.js?ver=17.0.1:9:74654)

The code of Block Code is (run well frontent):

<?php global $post; // global $product; $product_id = $post->ID; if( WC()->cart->find_product_in_cart( WC()->cart->generate_cart_id( $product_id ) ) ) { echo '

Déja dans panier


'; } elseif ( get_post_meta( $product_id, '_stock', true ) == 0 ) { echo '

Plus de place
disponible


'; } else { echo ' Réserver cet événement '; } ?>

If I click on the Code Block in navigator everything runs well and I can edit the code.
When I click in the display (left hand) I got the error.

Environment info

  • WordPress version: 6.0.1
  • Gutenberg Plugin version: not installed
  • Cwicly Plugin version: 1.1.9.1
  • Cwicly Theme version: 1.0.3
1 Like

Hi @weedor,

Interesting issue. The error looks similar to one we’ve experienced when switching responsive views in the Post Editor when an item inside the Query block is selected.

Looking into this.

1 Like