Make WordPress Core

#59243 closed defect (bug) (duplicate)

Posts and pages can use identical slugs

Reported by: wilkinsone's profile wilkinsone Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.3.1
Component: Permalinks Keywords:
Focuses: Cc:

Description

Originally noticed on sites using WP 6.3 but also tested on a new installation using WP 6.3.1, Twenty Twenty Three and no plugins. Create a post and a page with identical titles and identical slugs are created (WP is not adding a number to the slug). The post will be displayed on the archive page but when viewing the post (from frontend or backend preview), WP displays the page instead. Seems to apply to any slug but tested using post/page titles "Test 2023" and "Test". (This only applies to a post and page with identical titles. Two pages or two posts with identical titles do still have a number added to the slug.)

Change History (4)

#1 follow-up: @joemcgill
17 months ago

  • Keywords reporter-feedback added

Thanks for the report, and welcome to Trac, @wilkinsone!

Have you been able to reproduce this on a previous version of WordPress, or is this new behavior as of 6.3?

#2 in reply to: ↑ 1 @wilkinsone
17 months ago

Replying to joemcgill:

Thanks for the report, and welcome to Trac, @wilkinsone!

Have you been able to reproduce this on a previous version of WordPress, or is this new behavior as of 6.3?

I only discovered it by accident today so am not sure if it existed prior to 6.3.

#3 @wilkinsone
17 months ago

  • Keywords reporter-feedback removed

#4 @SergeyBiryukov
17 months ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #13459.

Note: See TracTickets for help on using tickets.