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

[WP6.1] Calender and Archive blocks are broken when fontFamily is changed #44530

Closed
t-hamano opened this issue Sep 28, 2022 · 2 comments
Closed
Labels
[Block] Archives Affects the Archives Block [Block] Calendar Affects the Calendar Block [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

Originally reported in trac: https://core.trac.wordpress.org/ticket/56678

The following two blocks, which support typography, cause errors when changing the font family.

  • core/archives
  • core/calendar

This does not occur when the gutenberg plugin is enabled, nor in other blocks that support font families. I expect this is a problem unique to dynamic blocks using ServerSideRender.

Step-by-step reproduction instructions

  • Insert the calender block or the archives block.
  • Change the font-family from Typograph panel.
  • Confirm that the block is broken.

Screenshots, screen recording, code snippet

46abe27eba03ca749803b73c12d21d1e.mp4

The browser console records a 500 error in the API request and React errors:

console_error

Environment info

  • WordPress version: 6.1-beta2-54344 (without Gutenberg plugin)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Block] Archives Affects the Archives Block [Block] Calendar Affects the Calendar Block labels Sep 28, 2022
@t-hamano
Copy link
Contributor Author

It is probably a REST API issue, as the endpoint displays the following error:

{
	"code": "rest_invalid_param",
	"message": "Invalid parameter(s): attributes",
	"data": {
		"status": 400,
		"params": {
			"attributes": "fontFamily is not a valid property of Object."
		},
		"details": {
			"attributes": {
				"code": "rest_additional_properties_forbidden",
				"message": "fontFamily is not a valid property of Object.",
				"data": null
			}
		}
	}
}

@t-hamano
Copy link
Contributor Author

This issue has been resolved in #43937 and is closed.
I will also comment in #43937 whether this PR should be backported to WordPress 6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Archives Affects the Archives Block [Block] Calendar Affects the Calendar Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant