Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#31903 closed defect (bug) (duplicate)

Changes to register_sidebar() May Lead to Data Loss

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

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
12 years ago

  • Severity normal → critical

#3 @ocean90
12 years ago

  • Severity critical → 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
12 years ago

  • Severity normal → 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
12 years ago

  • Milestone Awaiting Review → 4.2

#6 in reply to: ↑ 4 @ocean90
12 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
12 years ago

  • Priority normal → high

#8 @miqrogroove
12 years ago

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

#9 @DrewAPicture
12 years ago

#31903 was marked as a duplicate.

#10 @DrewAPicture
12 years ago

  • Milestone 4.2
  • Resolution → duplicate
  • Status new → 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.