Skip to content

Comments: Fix 'sprintf requires more than 1 params' error - #49054

Merged
aristath merged 1 commit into
trunkfrom
fix/49000
Mar 14, 2023
Merged

aristath merged 1 commit into
trunkfrom
fix/49000

Conversation

@aristath

Copy link
Copy Markdown
Member

What?

Fixes #49000

Why?

To avoid PHP errors. Please take a look at the report on #49000 for more details.

NOTE: The same error happens in WP-Core, so this will need to be backported to Core as well. cc @Mamaduka

@aristath aristath added [Type] Bug An existing feature does not function as intended Needs PHP backport Needs PHP backport to Core labels Mar 14, 2023
@aristath
aristath requested a review from Mamaduka March 14, 2023 09:33
@Mamaduka Mamaduka added Backport to WP Beta/RC [Block] Comments Affects the Comments Block - formerly known as Comments Query Loop and removed Needs PHP backport Needs PHP backport to Core labels Mar 14, 2023
@aristath

Copy link
Copy Markdown
Member Author

Created an issue on WordPress's Core trac and added a patch: https://core.trac.wordpress.org/ticket/57919

@Mamaduka

Copy link
Copy Markdown
Member

@aristath, there's no need for a separate core ticket and PR. The PHP changes from the block-library package are synced via package updates.

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This fixes the issue for me.

@Mamaduka Mamaduka changed the title sprintf requires more than 1 params Comments: Fix sprintf requires more than 1 params error Mar 14, 2023
@Mamaduka Mamaduka changed the title Comments: Fix sprintf requires more than 1 params error Comments: Fix 'sprintf requires more than 1 params' error Mar 14, 2023
@aristath

Copy link
Copy Markdown
Member Author

@aristath, there's no need for a separate core ticket and PR. The PHP changes from the block-library package are synced via package updates.

Ah OK, I didn't know if we need to backport this one manually since we're now at RC in Core. Good to know, thanks!

@aristath
aristath enabled auto-merge (squash) March 14, 2023 09:49

@costdev costdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @aristath! Since the unnecessary sprintf() was removed, and there were no changes to the string, this LGTM! 👍

@aristath
aristath merged commit 93a6791 into trunk Mar 14, 2023
@aristath
aristath deleted the fix/49000 branch March 14, 2023 10:06
@github-actions github-actions Bot added this to the Gutenberg 15.4 milestone Mar 14, 2023
@Mamaduka

Copy link
Copy Markdown
Member

I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 784081e

@hellofromtonya

Copy link
Copy Markdown
Contributor

This bug was introduced in 6.1, not in 6.2. Technically, this should not be backported during 6.2's RC cycle. Why? Only bugs and regressions introduced in the milestone and found during RC can be backported.

cc @Mamaduka

Mamaduka added a commit that referenced this pull request Mar 14, 2023
@Mamaduka

Copy link
Copy Markdown
Member

I just reverted PR from the wp/6.2 branch.

@hellofromtonya

Copy link
Copy Markdown
Contributor

Thank you @Mamaduka! This fix is slated for 6.2.1. It also needs automated tests added in Gutenberg and Core. See the details of the committer discussion here https://core.trac.wordpress.org/ticket/57883#comment:15.

@Mamaduka Mamaduka added the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label May 5, 2023
Mamaduka pushed a commit that referenced this pull request May 8, 2023
@Mamaduka

Mamaduka commented May 8, 2023

Copy link
Copy Markdown
Member

I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 5384ee8

@Mamaduka Mamaduka removed the Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release label May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Comments Affects the Comments Block - formerly known as Comments Query Loop [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sprintf requires 2 arguments in gutenberg_block_core_comment_template_render_comments

4 participants