Fix unable to publish edited legacy widgets in the customizer#31484
Fix unable to publish edited legacy widgets in the customizer#31484noisysocks merged 4 commits intotrunkfrom
Conversation
|
Size Change: +132 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
|
Why does |
|
Here's where it's set. Are we accidentally removing it in the frontend somewhere? |
|
Yes, it looks like |
| block.attributes.instance.encoded, | ||
| instance_hash_key: block.attributes.instance.hash, | ||
| raw_instance: block.attributes.instance.raw, | ||
| ...existingWidget.instance, |
There was a problem hiding this comment.
This seems to be throwing an error for new widgets.
I tried adding a SiteOrigin Button, and this line throws because existingWidget is null.
There was a problem hiding this comment.
Oh shoot, forgot about that.
There was a problem hiding this comment.
Lets make a note to add some tests for adding/updating/removing legacy widgets 👍
|
I think this one might have regressed. At least I can no longer save SiteOrigin legacy widgets in |
I can't reproduce it though 🤔. |
Description
Fix #31177.
Add missing
is_widget_customizer_js_valuevalue so that it can be saved and published. Apparently it's required.Currently editing a legacy widget will trigger the whole preview iframe to reload. Not sure why yet.
How has this been tested?
Follow the reproducing steps in #31177.
Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).