Make WordPress Core

Opened 7 months ago

Last modified 7 months ago

#61406 new defect (bug)

Heading block attribute type issue

Reported by: metaphorcreations's profile metaphorcreations Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5.4
Component: Posts, Post Types Keywords: needs-testing-info
Focuses: Cc:

Description

The Heading block is still using rich-text as the type for the content attribute and I am seeing the following warning:

Notice: Function rest_validate_value_from_schema was called incorrectly. The "type" schema keyword for content can only be one of the built-in types: array, object, string, number, integer, boolean, and null.

Change History (4)

#1 @mai21
7 months ago

  • Keywords needs-testing-info added

@metaphorcreations Thanks for reporting the issue. Can you please provide reproducible steps?

Note: Using https://wordpress.org/plugins/test-reports/ can help to add the needed info. Thanks

This ticket was mentioned in Slack in #core-test by mai21. View the logs.


7 months ago

#3 @metaphorcreations
7 months ago

@mai21 I have a custom plugin that works with Gravity Forms and uses blocks to design email templates. This error occurs When a form is submitted and the blocks are rendered for the notifications. I haven't run into the issue when just using blocks on pages/posts, etc... So, it's quite a few steps to replicate.

But, I do know that many core blocks that WordPress loads from the wp-includes/blocks/blocks-json.php file contain "rich-text" types, which is causing the issue for my plugin.

Is there a reason why core block attributes are still using the "rich-text" type when it's not supported anymore?

The type field MUST be one of the following:

null
boolean
object
array
string
integer
number (same as integer)
Note: See TracTickets for help on using tickets.