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

Correct function_exists() check typo introduced in #33331. #33513

Merged
merged 2 commits into from
Aug 5, 2021

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Jul 16, 2021

Description

This corrects a function_exists() check introduced in #33331.

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).

Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

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

Thanks, that was fast!

While we're here, could you test something on your end? Try to render a post that contains a "legacy" Query Loop block — that is, one serialised as wp:query-loop instead of wp:post-template? I ran into a fatal when the gutenberg_render_legacy_query_loop_block compat function tried to call an undefined render_block_core_post_template. I'd like to make sure this is just a consequence of my weird setup (as I'm in the middle of debugging something else). This is on WP 5.7.2, btw.

@annezazu annezazu added the [Type] Bug An existing feature does not function as intended label Jul 28, 2021
Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

I ran into a fatal when the gutenberg_render_legacy_query_loop_block compat function tried to call an undefined render_block_core_post_template.

That's true. Should we call gutenberg_render_block_core_post_template instead of render_block_core_post_template? Since we have moved this function outside of post-template/index.php the built file has appended gutenberg_ prefix, no?

@gziolo
Copy link
Member

gziolo commented Aug 5, 2021

Should we call gutenberg_render_block_core_post_template instead render_block_core_post_template? Since we have moved this function outside of post-template/index.php the built file has appended gutenberg_ prefix, no?

It seems like a good call since it's in the scope of the Gutenberg plugin so we might want to use the latest version of the render callback from Post Template block.

@mcsf
Copy link
Contributor

mcsf commented Aug 5, 2021

Sounds good. 🚢

@ntsekouras ntsekouras merged commit 1e6ede5 into trunk Aug 5, 2021
@ntsekouras ntsekouras deleted the fix/incorrect-function-exists-check branch August 5, 2021 13:15
@github-actions github-actions bot added this to the Gutenberg 11.3 milestone Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants