Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31903 closed defect (bug) (duplicate)

Changes to register_sidebar() May Lead to Data Loss

Reported by: miqrogroove's profile miqrogroove Owned by:
Milestone: Priority: high
Severity: critical Version: 4.2
Component: Widgets Keywords:
Focuses: Cc:

Description

4.2 introduces an E_USER_NOTICE error message if the active theme fails to include a non-empty id value in the args to register_sidebar().

Unfortunately, changing this value causes the sidebar to become blank, as tested in both 4.1.1 and 4.2-beta4. Reverting the theme restores the sidebar as well as the error message.

:(

Change History (10)

#1 @miqrogroove
10 years ago

  • Severity changed from normal to critical

#3 @ocean90
10 years ago

  • Severity changed from critical to normal

This is an expected behaviour since the id is how WordPress stores the widget area's contents. (#31675). The data shouldn't be lost too, because all widgets are moved into an inactivate sidebar, below Available Widgets .

#4 follow-up: @miqrogroove
10 years ago

  • Severity changed from normal to critical

I disagree. This would be a terrible mess for end users if we are forcing theme authors to fix what is essentially a poor API design. The args are clearly documented as being optional.

#5 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.2

#6 in reply to: ↑ 4 @ocean90
10 years ago

Replying to miqrogroove:

I disagree.

To what?

The args are clearly documented as being optional.

Yes, since [30745]. But since [23196] there is also this section:

* When allowing for automatic generation of the name and ID parameters, keep 
* in mind that the incrementor for your sidebar can change over time depending 
* on what other plugins and themes are installed.


Severity changed from critical to normal.

#7 @DrewAPicture
10 years ago

  • Priority changed from normal to high

#8 @miqrogroove
10 years ago

I disagree that asking theme authors to blank everyone's sidebars is expected behavior. This is insane.

#9 @DrewAPicture
10 years ago

#31903 was marked as a duplicate.

#10 @DrewAPicture
10 years ago

  • Milestone 4.2 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #31675.

Let's move the discussion in the original ticket, which has been reopened.

Note: See TracTickets for help on using tickets.