Opened 5 months ago
Closed 13 days ago
#23051 closed defect (bug) (fixed)
Menu with navigation label '0' gets removed
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Menus | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | info@…, mdhansen@… |
Description
There is no way to save a menu item with Navigation Label = 0 (zero). It gets removed. I think it's a bug in an if statement where 0 happens to be False or something similar.
Attachments (3)
Change History (12)
comment:1
SergeyBiryukov — 5 months ago
- Component changed from General to Menus
MikeHansenMe — 5 months ago
comment:3
MikeHansenMe — 5 months ago
- Cc mdhansen@… added
- Keywords has-patch needs-testing added
comment:4
SergeyBiryukov — 5 months ago
- Milestone changed from Awaiting Review to 3.6
In 23051.2.diff do a string length comparison, rather than empty or isset. Also refreshed for current trunk since things have moved around in menus.
Version 0, edited 3 months ago
by kovshenin
(next)
comment:6
MikeHansenMe — 13 days ago
Just tested 23051.2.diff and it still applies to current trunk(3.6-beta2-24227).
SergeyBiryukov — 13 days ago
comment:7
SergeyBiryukov — 13 days ago
I think we should have isset() in some of those checks.
23051.3.diff also simplifies the logic in wp_update_nav_menu_item().
comment:8
SergeyBiryukov — 13 days ago
- Keywords commit added; needs-testing removed
comment:9
SergeyBiryukov — 13 days ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 24235:
Note: See
TracTickets for help on using
tickets.

change empty to ! isset