Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#28183 closed defect (bug) (worksforme)

Widget contents removed from widget areas upon upgrade to 3.9.1

Reported by: toggerybob's profile toggerybob Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: Widgets Keywords: close
Focuses: Cc:

Description

Widget contents removed from widget areas upon upgrade to 3.9.1

Attachments (1)

Screenshot 2014-05-08 17.52.30.png (197.0 KB) - added by toggerybob 10 years ago.
Screen print of empty widget areas

Download all attachments as: .zip

Change History (21)

@toggerybob
10 years ago

Screen print of empty widget areas

#1 @westonruter
10 years ago

  • Keywords reporter-feedback added
  • Version changed from trunk to 3.9

Huh. We specifically addressed this 3.9 issue in #27897 which was included in 3.9.1. Can you confirm that the widgets hadn't gone away already when the site had been upgraded to 3.9, but just wasn't noticed? Or did someone else do a live preview of another theme right before the upgrade to 3.9.1? I just tried downgrading a local install to 3.8.3, modified some widgets, and then upgraded to 3.9.1 and the widgets remained intact.

#2 @toggerybob
10 years ago

  • Keywords reporter-feedback removed
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from 3.9 to trunk

After recreating all of the content, I found that each of my missing widgets were off to the left and marked as 'inactive'.

#3 @toggerybob
10 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#4 @acooley
10 years ago

My issue is with the sideback becoming inactive on the theme I am running. Will need to investigate how to update this as the theme is pretty old.

#5 @ocean90
10 years ago

  • Summary changed from Widget contents removed from widget areas upon upgrade to 3.9.1 *** URGENT *** to Widget contents removed from widget areas upon upgrade to 3.9.1
  • Version changed from trunk to 3.9.1

When have you noticed that the widgets are gone? Have you checked the theme first and then switched to the Widgets screen? Or have you visited the Widgets screen directly after the update?
From which version have you updated?

#6 @toggerybob
10 years ago

I noticed the missing widget contents just after I was upgraded from 3.9 to 3.9.1. Only after recreating the content from scratch, did I realize these were actually on the left side of the widget areas as 'inactive'. I remained on the plugins page the entire time.

#7 @Brianglanz
10 years ago

I've seen this one; it must not be #27897 exactly.

I had let the auto upgrade run, 3.9 to 3.9.1 on a network of 36 sites. I checked in and all appeared to be fine. Then, I noticed a typo in a widget, on the main or root site. I logged in to correct it, went straight to /wp-admin/widgets.php and on load, I found most widgets had been moved to Inactive Widgets.

Again, the widgets were not misplaced until after I loaded widgets.php. I'm in a rush, so can only offer two more bits of info and no fix (sorry).

1) The widgets were not all misplaced to Inactive, rather they were returned to a state I had previously saved while running 3.9. In that state, there were four widgets in use in the Main Sidebar and First Front Page Widget Area of a 2012 child theme. Those four widgets and their placement were preserved, while the six widgets I had more recently added were misplaced to Inactive. In the state which was partly lost, a few widgets were also in the Second Front Page Widget Area, but widgets were misplaced from all three sidebars in use.

2) Thankfully, this only happened on the main site. I confirmed that all network sites were up to 3.9.1 so the automagic must also have run /wp-admin/network/upgrade.php (thank you). However, it might also be the case that none of the other sites had edited a widget since the state which was preserved, so this paragraph might not actually be additional info. BG

#8 @westonruter
10 years ago

Is it known whether or not the theme was also upgraded before the WordPress 3.9.1 upgrade was run? The Theme_Upgrader::current_after() method in class-wp-upgrader.php can actually call switch_theme():

// Ensure stylesheet name hasn't changed after the upgrade:
if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
	wp_clean_themes_cache();
	$stylesheet = $this->result['destination_name'];
	switch_theme( $stylesheet );
}

This in turn will cause retrieve_widgets() to run.

#9 @westonruter
10 years ago

  • Keywords reporter-feedback added

I've taken the time to put together a thorough test harness for the issue (#27897) in 3.9. The test cases demonstrate what the problem was in 3.9. It then upgrades to 3.9.1 and tests to see if the problem still exists, including testing for what happens during a theme upgrade. I cannot reproduce any problem given the test cases I've written up. Can anyone identify any test cases that I'm not accounting for in my script?

#10 follow-up: @Doppa
10 years ago

Has this been fixed, as well as in relation to the theme preview fault #27897 (Theme preview empties sidebar on active theme)?

I tried changing theme after reading that it was fixed in #27897 but it still dumped the sidebar. I'd like to preview themes now but don't want to risk it if it's still a work in progress.

Last edited 10 years ago by westonruter (previous) (diff)

#11 in reply to: ↑ 10 @westonruter
10 years ago

Replying to Doppa:

Has this been fixed, as well as in relation to the theme preview fault #27897 (Theme preview empties sidebar on active theme)?

I tried changing theme after reading that it was fixed in #27897 but it still dumped the sidebar. I'd like to preview themes now but don't want to risk it if it's still a work in progress.

As I previously commented, I did extensive testing to nail down the exact scenario for reproducing the bug on WordPress 3.9, and then used the test cases to confirm that the issue is fixed in 3.9.1. So I have not been able to reproduce the issue now on 3.9.1. It would be helpful if you shared the themes and plugins that you are using, what theme was active when you tried doing a preview of another theme, and what this previewed theme was.

#12 follow-up: @Doppa
10 years ago

Hi Westonruter, thanks for your reply. This occurred immediately after the 3.9.1 notification. Attitude Theme (Theme Horse) was active at the time. I also had Responsive (Cyberchimps) and iTek themes installed and I think it was iTek I was previewing but cannot be certain. There have been several updates to these two themes though since I tried the preview that caused the error.

I have only three plugins and they are Contact Form 7, Shortcodes Ultimate and Woocommerce.

I'm a novice at Wordpress so I'm a bit scared to try any other themes now. I'm not too sure what the effects were now but they weren't too devastating as I didn't lose anything but I had to replace the Google map in the contact form and reinstate some Woocommerce pages.

Hope this is some help.

#13 in reply to: ↑ 12 @westonruter
10 years ago

Replying to Doppa:

Hi Westonruter, thanks for your reply. This occurred immediately after the 3.9.1 notification.

The notification that your site had been upgraded to 3.9.1? So after the upgrade to 3.9.1, you then tried going to the themes admin page and tried doing a Live Preview of another theme? Then you decided to not proceed with activating the theme, but instead went back. But when you did so you noticed that your sidebars had been emptied from your previously-activated theme. Is that right?

#14 @Doppa
10 years ago

Yes that's it exactly.

Version 0, edited 10 years ago by Doppa (next)

#15 @toggerybob
10 years ago

  • Keywords reporter-feedback removed

#16 follow-up: @westonruter
9 years ago

  • Keywords close added

There haven't been any reports of this issue happening in upgrades to 4.x, so I suggest this is no longer an issue.

#17 in reply to: ↑ 16 ; follow-up: @Doppa
9 years ago

Replying to westonruter:

There haven't been any reports of this issue happening in upgrades to 4.x, so I suggest this is no longer an issue.

I am still wary of trying out any new themes as I have been waiting to see if this ticket would be updated/resolved. Do you think it is safe for me to try now?

#18 in reply to: ↑ 17 @westonruter
9 years ago

Replying to Doppa:

I am still wary of trying out any new themes as I have been waiting to see if this ticket would be updated/resolved. Do you think it is safe for me to try now?

Actually, you should wait until 4.2 is released if you want to be sure. I identified a related issue with restoring widgets from a prior theme activation. See #31484.

But if you are especially concerned about testing this feature out, take a database backup before doing the switch. If something went wrong, restore the database dump. This would give you peace of mind.

#19 @Doppa
9 years ago

Thanks for your help Westonruter. It's not crucial that I try this so I'll wait till the release of 4.2.

#20 @wonderboymusic
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from reopened to closed

No recent feedback. Thanks for the report!

Note: See TracTickets for help on using tickets.