-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
REST API InteractionRelated to REST APIRelated to REST API[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[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
Milestone
Description
Issue Overview
If you have a block which stores its data in post meta and also registered other post meta for REST API usage, the other post meta gets also updated with the default value.
Steps to Reproduce (for bugs)
- Example plugin: https://gist.github.com/ocean90/7431114b689f1e0686f4f5dfa88838df
- Activate plugin
- Add the new block and fill the input
- Save draft and inspect the save request
- Notice that the meta entry includes all three meta keys while only one has been changed
Expected Behavior
Only changed meta data should get saved.
Possible Solution
I'm not sure yet if that's a limitation of the REST API and/or if Gutenberg can enhance that behaviour.
Related Issues
Todos
- Tests
- Documentation
Metadata
Metadata
Assignees
Labels
REST API InteractionRelated to REST APIRelated to REST API[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[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