Skip to content

Update all blocks to Block API version 3 for iframe editor compatibility #8045

Description

@donnapep

Steps to Reproduce

  1. Open the block editor on a site running WordPress 6.9+.
  2. Open the browser console.
  3. Insert or edit a page containing a Sensei block (e.g. sensei-lms/course-overview).
  4. See the deprecation warning.
Block with API version 2 or lower is deprecated since version 6.9. ... set the `apiVersion` field to 3 and test the block inside the iframe editor.

What I Expected

Sensei blocks register with Block API version 3 so they render inside the iframe editor, which is the path WordPress is standardizing on.

What Happened Instead

Several Sensei blocks are still registered with apiVersion 2 (or lower). WordPress 6.9 deprecates these and falls back to a non-iframe editor for them. A future release plans to drop that fallback, at which point these blocks may break.

What Needs to Happen

  • Audit all Sensei blocks and bump each to "apiVersion": 3 in its block.json.
  • Test each block inside the iframe editor after bumping — iframe isolation can break blocks that assume editor styles/scripts live in the main document, or that access document/window directly.

PHP / WordPress / Sensei LMS version

WordPress 6.9+ (deprecation introduced in 6.9).

Context / Source

Console deprecation warning from deprecated.js. Reference: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/block-migration-for-iframe-editor-compatibility/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions