-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
REST API InteractionRelated to REST APIRelated to REST API[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
With Gutenberg 18.0+, if a theme/plugin uses the register_setting() core function without using the show_in_rest, then the
Warning: Undefined array key "show_in_rest" in /wp-content/plugins/gutenberg/lib/compat/wordpress-6.6/option.php on line 35`
is thrown.
I believe Gutenberg should add defensive coding around this line, because according to the show_in_rest argument is not required and I expect to see a lot of those warnings in the wild.
For example, Yoast SEO's settings pages use the register_setting() function without the show_in_rest arg, so that warning is consistently thrown there.
Step-by-step reproduction instructions
- Install Gutenberg latest version and & Yoast SEO
- Go to Yoast SEO->Settings
- Confirm that you get a
Warning: Undefined array key "show_in_rest"warning
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
REST API InteractionRelated to REST APIRelated to REST API[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.