Block Widgets: Lost Widgets after viewing widgets.php
Quick summary
On at least two older themes, a visit to widgets.php seems to cause all widgets to go inactive, without even saving changes on the page.
Steps to reproduce
- Use an older theme. This has been reproduced in Vigilance, Digg 3, and in an internal theme so far
- Add widgets via Customize. Save changes (Alternatively, use a site with existing widgets)
- View the site; note the widgets are there
- Go to widgets.php. The widgets are immediately deactivated, without saving. No active widget area appears there.
NOTE: this also happened when viewing Customize > Widgets for the first time since block widgets were enabled, but I haven't been able to reproduce that consistently, because most of my test sites now use block widgets. I did notice, though, that after the initial loss, I can add widgets back in through the Customizer without them being lost when I revisit that tool.
What you expected to happen
Widgets should not automatically deactivate, regardless of theme.
What actually happened
Widgets are lost on some themes and can only be brought back through Customize, where inactive widgets don't exist.
Context
Forums post: https://wordpress.com/forums/topic/sidebar-disappeared-16/
Screen recording: https://cloudup.com/ckC1ZLmESLd
Operating System
No response
Browser
No response
Simple, Atomic or both?
No response
Theme-specific issue?
Vigilance + Digg 3 + an internal theme (ping me on slack for details)
Other notes
I haven't been able to duplicate this in a handful of other themes I checked, so when I first saw this error, I thought it was limited to that one internal theme. However, I experienced it again with this user today. I spot checked more themes, and have so far only seen the issue in two.
Reproducibility
Consistent
Severity
Some (< 50%)
Available workarounds?
Yes, difficult to implement (needs help from HE then user has to redo their widgets)
Workaround details
EDIT: HEs can use a sticker p7DVsv-cqD-p2 to fix this, then the user can re-add their widgets.
cc @mattwondra who saw this issue in action with another theme 😬
Another case here, probably. Site uses Digg 3 column; I confirmed in my test that it does the same thing, although interestingly, the second column of widgets didn't fall out. Just the first. However, I could not manage any of them via the widgets.php page. It just says "Inactive" there.
https://wordpress.com/forums/topic/how-do-i-restore-my-widgets-2
As a workaround, it looks like the HE in 3471171-hc disabled Block Widgets and the user was able to drag inactive widgets to the sidebar using the Classic widgets interface.
Ah! I was out for a while and must have missed that option. Thank you! It'd still be good if we could fix whatever is making the widgets fall out.
I believe we ran into this on the (retired) Verity theme also, all widgets were inactive. 31896520-hc
The issue was also reported on 4394491-zen.
I disabled Block Widgets and suggested the user try adding their inactive widgets again.
Sorry, I mistakenly closed the issue 😵💫
4395017-zd-woothemes
Another case with Tarski in this thread: https://wordpress.com/forums/topic/why-do-my-widgets-in-the-sidebar-keep-disappearing/
Applying workaround for now.
@dpasque, @cometgrrl, flagging for your attention 🙏
Another case here with the retired Choco theme: 4399721-zd-woothemes
Note: this site's widget page only shows an "Inactive widgets" area.
Enabled Block Widgets and moved their inactive widgets back to the now-visible Sidebar widget area.
Another one: 4399758-zen I've added the sticker as a workaround for now.
Also reported in https://wordpress.com/forums/topic/block-widgets-widget-disappearance-and-visibility-issues.
I've toggled the block widgets sticker in the RC for now which has restored access to the deactivated widgets
Another report: 4042754-hc
They're using a retired theme, Enterprise.
I disabled the block widget from Blog RC as a workaround.
Tagging @Automattic/flow-patrol-create based on issue content
Also pinged internally: p1635173245005700-slack-C029HCKPXP0
Another case here: 32389054-hc
I've seen a related issue with new widgets not saving on .com simple sites. This seems to happen with newer themes too, so split into a separate issue: https://github.com/Automattic/wp-calypso/issues/57330
Another report here 23517333-hc A really old theme, INove.
After commenting out this line in core, visiting /wp-admin/widgets.php when using the theme Vigilance, the widgets are not immediately deactivated. However, they still fail to load in widgets.php. This isn't a fix, but helps decode what is happening: retrieve_widgets() tries to "find lost widgets", and saves changes to the database. However, whatever is causing widgets.php to not find the widget sections from the older themes, is causing the retrieve_widgets() mechanism to immediately deactivate those widgets upon viewing.
I have a patch for review & testing in D69021-code . Would appreciate some eyes and testing on it, before deploying.
Another one at 31263153-hc Used the sticker workaround for now.
Another one at 29986512-hc Used the sticker workaround but there were a bunch of invalid block widgets leftover that we had to delete manually. They'd also like to be notified when this is fixed, thanks!
32412225-hc
Simple site user with retired iNove theme.
They reported that they accessed Customize > widgets and all widgets were moved to inactive.
Closing this issue, which should be fixed by D69021-code. Please reopen if needed.
Hi everyone 👋 Just a quick note to let you all know @Automattic/bug-herders have finished following up with affected users reported in this thread.
Thanks for the reports, please let us know here if you see any future recurrence of the issue.
Just had a report on 20076058-hc They're using the Colinear theme by Automattic
Closing this for now - don't seem to have any more reports.
A new report on 4609957-zd-woothemes - using retired Temi theme. I disabled Block Widgets in BRC and asked user to drag and drop from "Inactive Widgets" in the Classic Widgets interface.
More reports- 4704973-zd-woothemes - Outspoken (theme) 4712777-zd-woothemes - Port (theme)
When adding widgets to the sidebar from Appearance> Widgets section, the widgets are going to the Inactive widgets placeholder.
Adding widgets through Apperance> Customizer> Widgets is ok.
Reopening the issue for review. @Greatdane, can you and @Automattic/dotcom-triage-pa-group try to reproduce @ahmadbaig1's new report above?
@chad1008, if there are any recent updates you can think of that might be related, we'd appreciate any help!