[wp-trac] [WordPress Trac] #24146: Menu items with blank labels are removed on saving

WordPress Trac noreply at wordpress.org
Tue Feb 3 15:29:46 UTC 2026


#24146: Menu items with blank labels are removed on saving
-------------------------------------------------+-------------------------
 Reporter:  rodrigo@…                            |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Menus                                |     Version:  3.5.1
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch needs-        |     Focuses:
  refresh                                        |
-------------------------------------------------+-------------------------
Changes (by ozgursar):

 * keywords:  dev-feedback has-patch needs-testing => dev-feedback has-patch
     needs-refresh


Comment:

 == Patch Testing Report

 Patch Tested:
 https://core.trac.wordpress.org/attachment/ticket/24146/24146.3.diff

 === Environment
 - WordPress: 7.0-alpha-61215-src
 - PHP: 8.2.29
 - Server: nginx/1.29.4
 - Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 144.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-One 2.7
 - MU Plugins: None activated
 - Plugins:
   * Code Snippets 3.9.4
   * Test Reports 1.2.1

 === Steps taken
 1. Activate a classic theme
 2. Add a new menu
 3. Add two custom links `https://example.com` with the label `test1` and
 `test2`
 4. Assign the menu a position on the theme for testing
 5. View homepage and test the menu works
 6. Edit the menu and remove label of `test2`
 7. `Test2` gets removed as soon as menu is saved
 8. Apply patch
 9. ❌ Patch is failing to apply.

 === Additional Notes
 - When I tried to apply the patch agains the latest `trunk`
 (7.0-alpha-61215-src) it fails to apply with the following message and
 rejects:


 {{{
 Running "patch:24146" (patch) task
 ? Please select a patch to apply 24146.3.diff​ (2.0 KB) - added by vinod
 dalvi 9 years ago.
 patching file 'src/wp-admin/includes/nav-menu.php'
 1 out of 1 hunks failed--saving rejects to 'src/wp-admin/includes/nav-
 menu.php.rej'
 patching file 'src/wp-includes/nav-menu-template.php'
 patching file 'src/wp-includes/nav-menu.php'
 1 out of 1 hunks failed--saving rejects to 'src/wp-includes/nav-
 menu.php.rej'
 }}}

 Thus, I removed `needs-testing` and added `needs-refresh`

 === Screenshots/Screencast with results
 Bug reproduction video: https://i.imgur.com/XFb0KkI.mp4

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/24146#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list