ServerSideRender no longer passing post_id query arg #31786
Labels
[Package] Server Side Render
/packages/server-side-render
[Type] Regression
Related to a regression in the latest release
Description
I believe the change in PR #29246 was slightly flawed.
It may have resolved the problem with Server Side Rendered blocks failing when used in the Site Editor or Template editor but it's broken other SSR blocks which depend on the post_id being passed on the REST request to render the block.
It was working in 10.3.2; broken in 10.4.0 and higher.
The code change was:
gutenberg/packages/server-side-render/src/index.js
Line 26 in 3f1c34e
In my system
typeof currentPostId.id
isundefined
.I believe the code should have been
Step-by-step reproduction instructions
post_id
being passed during server side rendering of the block in the editor.Expected behaviour
For
<ServerSideRendered>
blocks thepost_id
query arg should be passed to the server when editing a post.Actual behaviour
It's not being passed. The blocks do not render correctly in the editor.
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: