wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Block Widgets: Lost Widgets after viewing widgets.php

Open supernovia opened this issue 4 years ago • 50 comments

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

  1. Use an older theme. This has been reproduced in Vigilance, Digg 3, and in an internal theme so far
  2. Add widgets via Customize. Save changes (Alternatively, use a site with existing widgets)
  3. View the site; note the widgets are there
  4. 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.

supernovia avatar Oct 19 '21 23:10 supernovia

cc @mattwondra who saw this issue in action with another theme 😬

supernovia avatar Oct 19 '21 23:10 supernovia

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

supernovia avatar Oct 20 '21 17:10 supernovia

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.

kelasante avatar Oct 20 '21 18:10 kelasante

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.

supernovia avatar Oct 20 '21 22:10 supernovia

I believe we ran into this on the (retired) Verity theme also, all widgets were inactive. 31896520-hc

mikeicode avatar Oct 21 '21 16:10 mikeicode

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 😵‍💫

Gustavo-Hilario avatar Oct 22 '21 13:10 Gustavo-Hilario

4395017-zd-woothemes

formosattic avatar Oct 23 '21 08:10 formosattic

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.

supernovia avatar Oct 23 '21 16:10 supernovia

@dpasque, @cometgrrl, flagging for your attention 🙏

inaikem avatar Oct 24 '21 03:10 inaikem

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.

inaikem avatar Oct 24 '21 07:10 inaikem

Another one: 4399758-zen I've added the sticker as a workaround for now.

sharonlaker19 avatar Oct 24 '21 07:10 sharonlaker19

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

jerrysarcastic avatar Oct 24 '21 19:10 jerrysarcastic

Another report: 4042754-hc

They're using a retired theme, Enterprise.

I disabled the block widget from Blog RC as a workaround.

rinazrina avatar Oct 24 '21 23:10 rinazrina

Tagging @Automattic/flow-patrol-create based on issue content

dpasque avatar Oct 25 '21 14:10 dpasque

Also pinged internally: p1635173245005700-slack-C029HCKPXP0

dpasque avatar Oct 25 '21 14:10 dpasque

Another case here: 32389054-hc

KirkwallDay avatar Oct 25 '21 17:10 KirkwallDay

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

mreishus avatar Oct 25 '21 18:10 mreishus

Another report here 23517333-hc A really old theme, INove.

nickpagz avatar Oct 25 '21 19:10 nickpagz

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.

mreishus avatar Oct 25 '21 20:10 mreishus

I have a patch for review & testing in D69021-code . Would appreciate some eyes and testing on it, before deploying.

david-binda avatar Oct 26 '21 12:10 david-binda

Another one at 31263153-hc Used the sticker workaround for now.

sharonlaker19 avatar Oct 26 '21 13:10 sharonlaker19

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!

sharonlaker19 avatar Oct 26 '21 15:10 sharonlaker19

32412225-hc

Simple site user with retired iNove theme.

They reported that they accessed Customize > widgets and all widgets were moved to inactive.

JoshuaGoode avatar Oct 26 '21 18:10 JoshuaGoode

Closing this issue, which should be fixed by D69021-code. Please reopen if needed.

chad1008 avatar Oct 27 '21 11:10 chad1008

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.

Greatdane avatar Oct 28 '21 07:10 Greatdane

Just had a report on 20076058-hc They're using the Colinear theme by Automattic

sharonlaker19 avatar Nov 05 '21 14:11 sharonlaker19

Closing this for now - don't seem to have any more reports.

Greatdane avatar Nov 11 '21 06:11 Greatdane

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.

jromales avatar Dec 14 '21 11:12 jromales

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.

ahmadbaig1 avatar Jan 25 '22 16:01 ahmadbaig1

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!

inaikem avatar Jan 26 '22 01:01 inaikem