[wp-trac] [WordPress Trac] #63508: Numeric Slugs break on Child Pages

WordPress Trac noreply at wordpress.org
Sun Jun 1 23:08:16 UTC 2025


#63508: Numeric Slugs break on Child Pages
--------------------------+----------------------------------------
 Reporter:  SirLouen      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Permalinks    |    Version:
 Severity:  major         |   Keywords:  needs-patch good-first-bug
  Focuses:                |
--------------------------+----------------------------------------
 == Bug Report
 === Description
 When creating a numeric slug as a child page, system ads a `-2`
 For example if you want to have something like `/exhibitions/2025` it will
 switch to `/exhibitions/2025-2`

 For reference #5305 #14238

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.5
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty 2.9
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Reproduction Instructions
 1. Switch to postname Permalinks (Settings > Permalinks)
 2. Create a Parent page
 3. Create a Page with a number and set the Parent page as Parent
 4. 🐞 Check the slug, not respected, ads a `-2` (check screenshot
 attached)

 === Expected Results
 1.  ✅ URL should be like `/parent/2025/`

 === Actual Results
 1.  ❌ URL is `/parent/2025-2/`

 === Supplemental Artifacts
 Demo Screenshot

 [[Image(https://i.imgur.com/IABtkUs.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63508>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list