Fix: block-renderer 400 for third-party blocks (frbl* attrs not registered server-side) - #274
Open
davidperezgar wants to merge 2 commits into
Open
Fix: block-renderer 400 for third-party blocks (frbl* attrs not registered server-side)#274davidperezgar wants to merge 2 commits into
davidperezgar wants to merge 2 commits into
Conversation
…schema The blocks.registerBlockType JS filter injects frblAnimation and related attributes into every block's editor settings, but no PHP counterpart declared them in the block's REST schema. Any third-party block whose block.json doesn't already list these attributes gets rejected by wp/v2/block-renderer with rest_additional_properties_forbidden, breaking ServerSideRender in the editor for that block. Add a register_block_type_args filter that mirrors the same attributes and the same gravityforms/ exclusion server-side, so the schema used by the REST block-renderer matches what the client already sends. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70497ba186
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5 tasks
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
blocks.registerBlockTypeJS filter inAnimations.phpinjectsfrblAnimationand 9 related attributes into every block's editor settings (client-side only), but no PHP counterpart registered them in each block's REST schema.block.jsondoesn't already declare these attributes gets rejected bywp/v2/block-rendererwithrest_additional_properties_forbidden, which breaksServerSideRenderin the editor for that block (shows "Error al cargar el bloque").nudge/reviewsdynamic block from a separate plugin failed to render in the editor with this exact error.register_block_type_argsfilter that mirrors the same attributes (and the samegravityforms/exclusion) server-side, so the REST block-renderer schema matches what the client already sends. Same pattern already used elsewhere in this plugin (TextAnimation.php,StickyColumn.php,Headline.php, etc.) for the same reason.Test plan
wp/v2/block-renderer/nudge/reviewsbefore the fix (rest_invalid_param/frblAnimation no es una propiedad válida del objeto)🤖 Generated with Claude Code