Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#14893 closed defect (bug) (worksforme)

wp_inactive_widgets sidebar forgotten, then does notice in /wp-admin/widgets.php

Reported by: hakre's profile hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0.1
Component: Warnings/Notices Keywords: has-patch
Focuses: Cc:

Description

The 'wp_inactive_widgets' is not initalized but used later on.

Can be fixed easily by adding it while the array get's initialized.

Attachments (1)

14893.patch (919 bytes) - added by hakre 14 years ago.

Download all attachments as: .zip

Change History (11)

#1 @hakre
14 years ago

  • Summary changed from wp_inactive_widgets sidebar forgotten, than does notice in /wp-admin/widgets.php to wp_inactive_widgets sidebar forgotten, then does notice in /wp-admin/widgets.php

@hakre
14 years ago

#2 follow-up: @Denis-de-Bernardy
14 years ago

Mm, I'm suspecting the suggested patch will break some upgrade/backwards compatibility code we introduced around WP 2.8. It's better use isset() where needed to avoid the notices when there are any.

#3 in reply to: ↑ 2 @hakre
14 years ago

Replying to Denis-de-Bernardy:

Mm, I'm suspecting the suggested patch will break some upgrade/backwards compatibility code we introduced around WP 2.8. It's better use isset() where needed to avoid the notices when there are any.

Can you please make that suspection concrete with the patch because I do not see the problem here.

#4 @Denis-de-Bernardy
13 years ago

Can't recall the specifics, but it had to do with issues upgrading very old sites (prior to 2.5). The widgets were moved around in sidebars, basically. A cursory search leads to these:

#9695, #10092, r11164

#5 @Denis-de-Bernardy
13 years ago

Tons more here, for your reading pleasure: #9511. don't forget to look around in related tickets, and related to related tickets.

Alternatively, trust me a take this short short version at face value: the WP widgets API will blow up in your face on changes like the one you suggest, and it's better to add whatever isset() calls are needed until it's rewritten from the ground up.

#6 @markjaquith
13 years ago

  • Milestone changed from Awaiting Review to Future Release

How many places would isset() checks be required to squash the notices? If it's just a handful, do that.

#7 follow-up: @alexvorn2
11 years ago

have the same issue, the problem is that the notice appears only once ( after theme actiavation ) :

wp_inactive_widgets in D:\Dropbox\htdocs\wordpresslastmu\wp-includes\widgets.php on line 1266

#8 in reply to: ↑ 7 ; follow-up: @SergeyBiryukov
11 years ago

  • Keywords reporter-feedback added

Replying to alexvorn2:

have the same issue, the problem is that the notice appears only once ( after theme actiavation )

The code was changed in #17979. Could you please add the steps to reproduce? Does it happen with a specific theme?

#9 in reply to: ↑ 8 @alexvorn2
11 years ago

Replying to SergeyBiryukov:

The code was changed in #17979. Could you please add the steps to reproduce? Does it happen with a specific theme?

everything is fine now, I made some modifications and the sidebars[wp_inactive_widgets] javascript value from widgets.php page were missing in the widgets data array (js)

#10 @SergeyBiryukov
11 years ago

  • Keywords reporter-feedback removed
  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.