10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.25k stars 313 forks source link

BUG: WP 6.7 Compatability #4021

Open psorensen opened 3 days ago

psorensen commented 3 days ago

Describe the bug

ElasticPress Prevents New Iframe Editor Behavior in WordPress 6.7+

WordPress 6.7 introduced a new method of iframing the post editor. However, ElasticPress appears to block this functionality. A key indicator that the new iframe editor is being used is the presence of the Zoom tool in the top bar

For more context, refer to the WordPress Core announcement about post editor iframing with meta boxes, particularly the "Remaining exception to the iframe" section.

Likely Cause

ElasticPress registers all its blocks with apiVersion: 2, which likely causes this conflict.

Steps to Reproduce

  1. Install WP 6.7.1
  2. Create a new post and observe zoom control in top bar of block editor
  3. activate elasticpress
  4. observe the zoom control from step 2 is not showing

Screenshots, screen recording, code snippet

Image

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

psorensen commented 3 days ago

Here's a workaround for anyone who might find this.

function update_all_blocks_to_v_3( $metadata ) {
    $metadata['apiVersion'] = 3;

    return $metadata;
};

add_filter( 'block_type_metadata', 'update_all_blocks_to_v_3' );