Opened 10 years ago
Closed 10 years ago
#31903 closed defect (bug) (duplicate)
Changes to register_sidebar() May Lead to Data Loss
Reported by: |
|
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)
#3
@
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:
↓ 6
@
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.
#6
in reply to:
↑ 4
@
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.
see #31675