Skip to content

fix: resolve documentTypeUnique for Block Grid nested in an element type (#293, #291)#311

Merged
rickbutterfield merged 1 commit into
v6/devfrom
v6/bugfix/293-nested-element-grid-documenttype
Jul 1, 2026
Merged

fix: resolve documentTypeUnique for Block Grid nested in an element type (#293, #291)#311
rickbutterfield merged 1 commit into
v6/devfrom
v6/bugfix/293-nested-element-grid-documenttype

Conversation

@rickbutterfield

Copy link
Copy Markdown
Owner

Summary

Backport of #309 to v6. Fixes the The property type is invalid. error when previewing a Block Grid nested inside an element type (issues #293 nested-element regression and #291).

A Block Grid preview needs two independent values:

  • nodeKey → the document being previewed
  • documentTypeUnique → the content type that declares the block-editor property

For a Block Grid property declared on a nested element type, the content-workspace lookup (which passes beyond alias matches since #297) resolved the root document type — which doesn't declare the nested property alias — so the server returned The property type is invalid.

Fix

  • Resolve documentTypeUnique from the nearest block workspace's element content type when nested, falling back to the document type at top level.
  • nodeKey resolution is unchanged (Fails getting nodeKey in nested block lists #297 preserved). Block Grid only — list/single/rich-text render paths don't use documentTypeUnique.

Backport notes

🤖 Generated with Claude Code

…ype (#293, #291)

Backport of #309 to v6.

A Block Grid preview resolves documentTypeUnique (the content type that
declares the block-editor property) separately from nodeKey. For a Block Grid
nested inside an element type it wrongly resolved the root document type, so
the server returned "The property type is invalid." Resolve documentTypeUnique
from the nearest block workspace's element content type when nested; nodeKey is
unchanged.

The backoffice bundle is rebuilt from v6 source (not copied from the v5 PR).
Also backports the new CI workflow and the frontend test run added to
release.yml in #309.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickbutterfield rickbutterfield merged commit c7ffdd9 into v6/dev Jul 1, 2026
1 check passed
@rickbutterfield rickbutterfield deleted the v6/bugfix/293-nested-element-grid-documenttype branch July 1, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant