Opened 10 years ago
Closed 10 years ago
#38539 closed defect (bug) (fixed)
Customizer post/page stubs fail to get unique slugs when publishing
| Reported by: | westonruter | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Customize | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description (last modified by )
I noticed that after initializing Twenty Seventeen all of the Top nav menu items all linked to the homepage. It turns out that the auto-draft status post/page stubs were not getting a post_name specified and so the permalink for them would point to the homepage.
Likewise, when adding new nav menu items, I'm able to supply titles which then result in pages/posts that have the same post_name as other items. This is due to wp_publish_posts() being used which bypasses the unique slug check.
Attachments (3)
Change History (10)
#2
@
10 years ago
- Description modified (diff)
- Keywords has-patch needs-unit-tests added
- Owner set to
- Status new → accepted
- Summary Auto-draft posts/pages inserted from starter content lack slugs → Post/page stubs fail to get unique slugs
#4
@
10 years ago
- Summary Post/page stubs fail to get unique slugs → Customizer post/page stubs fail to get unique slugs when publishing
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Naturally this issue was addressed by
\WP_Customize_Nav_Menus::insert_auto_draft_post()and since we require the nav menus component anyway for inserting post/page stubs, we might as well re-use it.