[wp-trac] [WordPress Trac] #35209: Permalinks of published pages get changed when creating new pages as a draft

WordPress Trac noreply at wordpress.org
Sat Mar 21 02:13:06 UTC 2026


#35209: Permalinks of published pages get changed when creating new pages as a
draft
------------------------------------------------+--------------------------
 Reporter:  Asgaros                             |       Owner:  (none)
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:
Component:  Permalinks                          |     Version:  4.4
 Severity:  normal                              |  Resolution:
 Keywords:  dev-feedback close has-screenshots  |     Focuses:
                                                |  administration
------------------------------------------------+--------------------------
Changes (by gaisma22):

 * keywords:  needs-testing dev-feedback => dev-feedback close has-
               screenshots


Comment:

 == Reproduction Report

 === Environment
 - WordPress: 7.0-beta3-61849-src
 - PHP: 8.3.30
 - Server: nginx/1.29.5
 - Database: MySQL 8.4.8
 - Browser: Brave
 - OS: Ubuntu
 - Theme: Twenty Twenty-Five (twentytwentyfive)
 - MU Plugins: None
 - Plugins: None (first test), Hello Dolly 1.7.2 (second test)

 === Steps taken
 1. Created a new page titled "Test 1". Slug was auto-generated as
 "test-1".
 2. Changed the slug from "test-1" to "test", then published the page.
    Page is now live at /test/.
 3. Created a new page titled "Test 2". Slug was auto-generated as
 "test-2".
 4. Changed the slug of "Test 2" from "test-2" to "test". WordPress kept
    "test" in the slug field without immediately correcting it.
 5. Clicked "Save Draft". WordPress automatically corrected the slug to
    "test-2" upon saving.
 6. Navigated to Pages list and opened "Test 1".
 7. Slug on "Test 1" still showed "test" - unchanged.
 8. Added content to "Test 1" and clicked Save/Update.
    Slug remained "test" after updating.
 Result: ❌ Bug is not occurring

 === Expected behavior
 Based on the ticket description, saving "Test 2" as a draft with slug
 "test"
 should have caused "Test 1's" slug to silently change from "test" to
 "test-2",
 stealing the slug from the already published page.

 === Additional Notes
 1. Tested first in a clean environment with no plugins active.
 2. Environment was reset and the test was repeated with Hello Dolly 1.7.2
 active.
 3. In WP 7.0, the slug correction happens at save time - when "test" was
 typed
    as the slug for Test 2 and Save Draft was clicked, WordPress saved it
 as
    "test-2" in the database, protecting Test 1's slug throughout.
 4. Both runs produced the same result.
 5. Removing `needs-testing` as the bug does not reproduce in WordPress
    7.0-beta3-61849-src. Adding `close` - the issue appears fixed in a
 previous
    release. Leaving open in case another tester wants to run a second
 test.

 === Screenshots/Screencast with results

 [[Image(https://i.ibb.co/8gGqmn04/02-test1-published-at-test.png)]]

 [[Image(https://i.ibb.co/6Jsvw3vN/03-test2-slug-set-to-test.png)]]

 [[Image(https://i.ibb.co/SWzpvm6/04-test2-draft-saved-slug-corrected-to-
 test2.png)]]

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


More information about the wp-trac mailing list