Opened 8 years ago
Closed 8 years ago
#38539 closed defect (bug) (fixed)
Customizer post/page stubs fail to get unique slugs when publishing
Reported by: | westonruter | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
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
@
8 years ago
- Description modified (diff)
- Keywords has-patch needs-unit-tests added
- Owner set to westonruter
- Status changed from new to accepted
- Summary changed from Auto-draft posts/pages inserted from starter content lack slugs to Post/page stubs fail to get unique slugs
#4
@
8 years ago
- Summary changed from Post/page stubs fail to get unique slugs to Customizer post/page stubs fail to get unique slugs when publishing
Note: See
TracTickets for help on using
tickets.
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.