-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Widgets: Temporary fix for saving widgets (#28078)
* Widgets: Temporary fix for saving widgets Fixes two issues with saving widgets on the widgets screen: 1. Unable to save a new widget. What's happening here is that `saveEntityRecord()` passes execution back to `saveWidgetArea()` before it has a chance to call `addToBatch`. This means that nothing is in the batch processing queue when `processBatch()` is called. The temporary fix is to wait for a promise before calling `processBatch()`. This allows execution in `saveEntityRecord()` to resume. 2. Unable to save existing widgets. What's happening here is that the client IDs are changed by `useBlockSync()`. This breaks the internal mapping that the widget editor maintains of widget IDs <-> block client IDs. The temporary fix is to have the widgets editor pass a prop to `useBlockSync()` that disables cloning blocks. * Fix typo in comment
- Loading branch information
1 parent
f27e8bd
commit da6d7ae
Showing
4 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters