Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable passing post_id query arg for Server Side Rendering (#31786) #31787

Merged
merged 1 commit into from
May 19, 2021

Conversation

bobbingwide
Copy link
Contributor

Description

A change in PR #29246 altered a test so that it always failed.
It was testing typeof currentPostId.id which was undefined; in the block editor currentPostId is an integer.

Blocks which were Server Side Rendered and relied on the post_id being passed in the REST request were failing to return anything. They still worked when rendered for the front end.

I deleted three characters: .id.

How has this been tested?

  • In a local development environment with the sb-children-block plugin.
  • Tested in the block editor - see screenshot
  • Tested in the site editor

Screenshots

image

Types of changes

Fixes a regression introduced in Gutenberg 10.4.0 by PR #29246

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@bobbingwide
Copy link
Contributor Author

Here's the screen capture of the Site editor. I changed the Depth parameter. The Request URL doesn't contain the post_id query arg. The block returns an empty list since it has no post parent to find the children of.

image

@Mamaduka Mamaduka added [Package] Server Side Render /packages/server-side-render [Type] Regression Related to a regression in the latest release labels May 14, 2021
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me ✅

Thanks for fixing this @bobbingwide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Server Side Render /packages/server-side-render [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants