fix: resolve documentTypeUnique for Block Grid nested in an element type (#293, #291)#311
Merged
rickbutterfield merged 1 commit intoJul 1, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 previeweddocumentTypeUnique→ the content type that declares the block-editor propertyFor 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
documentTypeUniquefrom the nearest block workspace's element content type when nested, falling back to the document type at top level.nodeKeyresolution is unchanged (Fails getting nodeKey in nested block lists #297 preserved). Block Grid only — list/single/rich-text render paths don't usedocumentTypeUnique.Backport notes
ci.ymland the frontend test run added torelease.ymlin fix: resolve documentTypeUnique for Block Grid nested in an element type (#293, #291) #309.🤖 Generated with Claude Code