Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#24237 closed defect (bug) (duplicate)

Draft Pages Missing Parent Slug In Permalink

Reported by: lucasstark's profile lucasstark Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Editor Keywords: has-patch
Focuses: administration Cc:


Draft pages are missing the direct parent's slug as part of the permalink. When the page is published it does receive the correct full permalink.

To reproduce:

Create a new page.
Select a parent.
Save draft ( do not publish yet ).
Review the permalink that is displayed. It will be missing the parent slug.

Add New Page:

After Draft is Saved:

The permalink should include "contact" at this point. It will not until it is published.

Attachments (1)

24237.patch (425 bytes) - added by chriseverson 10 years ago.

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
11 years ago

Previously reported in #13932.

#2 @ethitter
11 years ago

  • Cc erick@… added

#3 @SergeyBiryukov
11 years ago

  • Component changed from General to Permalinks

#4 @kiaseven
10 years ago


We are seeing this issue on one of our sites after a recent upgrade to version 3.8.1. Any chance there is a fix on its way or am I echoing into the ether?



#5 @SergeyBiryukov
10 years ago

  • Keywords needs-patch added

10 years ago

#6 @chriseverson
10 years ago

  • Keywords has-patch added; needs-patch removed

Slugs aren't saved on drafts until the post is either published or the slug is manually updated. To display the sample permalink, we temporarily generate a post_name then pass the object through get_page_uri( ), however once it hits get_page_uri(), the function then pulls a fresh copy of the WP_Post object from the database, which was overwriting the temporary post_name value. This patch resolves that issue while still allowing get_page_uri() to accept either a WP_Post object or ID.

#7 @iseulde
9 years ago

  • Component changed from Permalinks to Editor
  • Focuses administration added
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #6619.

Note: See TracTickets for help on using tickets.