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

WordPress Trac noreply at wordpress.org
Wed Dec 23 13:14:40 UTC 2015


#35209: Permalinks of published pages get changed when creating new pages as a
draft
----------------------------+-----------------------------
 Reporter:  Asgaros         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Permalinks      |    Version:  4.4
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 While looking over ticket #35197 I found some other strange behavior where
 a permalink of a published page will be overwritten by a newly created
 draft page.

 Here are the steps to reproduce it (''4.4''/''trunk''):

 '''Step 1'''

 Add a new page with the title ''"Test 1"''. When switching to the editor,
 a permalink is generated:
 ''http://your-site.com/test-1/''

 '''Step 2'''

 Click the ''Edit'' button next to the generated permalink, change the
 permalink from ''"test-1"'' to ''"test"'', click ''OK'' and click the
 ''Publish'' button to publish the newly created page.

 '''Step 3'''

 Add a new page with the title ''"Test 2"''. When switching to the editor,
 a permalink is generated:
 ''http://your-site.com/test-2/''

 '''Step 4'''

 Click the ''Edit'' button next to the generated permalink, change the
 permalink from ''"test-2"'' to ''"test"'' and click ''OK''. The permalink
 gets changed back to ''test-2'' correctly because the already published
 ''Test 1'' page is using ''test'' as a permalink.

 '''Step 5'''

 Click the ''Save Draft'' button to save the ''Test 2'' page as a draft. Do
 '''NOT''' publish it!

 '''Step 6'''

 Switch to the ''"All pages"'' area and open the ''Test 1'' edit page.

 '''Step 7'''

 SURPRISE! The permalink of the already published page ''Test 1'' changed
 from ''"test"'' to ''"test-2"''.

 Curiously when you hover the permalink it still uses the correct
 ''"test"'' permalink.

 [[Image(http://fs5.directupload.net/images/151223/r6gqvcph.png)]]

 '''Step 8'''

 Okay, now lets change something at the site. Add some text for example and
 click the ''Update'' button.

 After ''Step 8'' the permalink of the ''Test 1'' page gets changed to
 ''"test-2"'' while the ''Test 2'' page is using the ''"test"'' permalink
 now.

 There should be a patch for this because permalinks of already published
 pages can easily get changed when you are not aware of this problem. The
 main issue is that in this case all incoming links from third-party
 websites will not link to the correct page anymore.

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


More information about the wp-trac mailing list