Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33089 closed defect (bug) (duplicate)

Empty title on page generates invalid permalinks

Reported by: jayce53's profile Jayce53 Owned by:
Milestone: Priority: normal
Severity: major Version: 4.2.2
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

If permalinks are enabled, publishing a post with an empty title generates an invalid permalink (a spurious "-2" is appended to the post ID) on the post edit page in the "Permalink:" field and the link on the "preview post" button. The link generated for the "Preview Changes" button is OK immediately after publishing, but it is also incorrect after updating the post.

Change History (2)

#1 @atomicjack
9 years ago

  • Component changed from General to Posts, Post Types
  • Keywords needs-patch added
  • Severity changed from normal to major

Confirmed.

Reproduce steps:

  • Create a new post with no title, click publish
  • Click View Post
  • You'll see a 404

Notes:

  • the ?p parameter does increment
  • the post does not display in the post list in wp-admin

#2 @boonebgorges
9 years ago

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

Thanks for the report, Jayce53.

This problem should be fixed as part of the work in #5305. The changes in that ticket properly enforce the "spurious" '-2' suffix, which ensures that a post with the ID '2015' doesn't have a URL that conflicts with the date archive for the year 2015. See especially [33261].

I'm going to mark this ticket as a duplicate of #5305. If you find that there are still issues on the latest trunk, please reopen with details.

Note: See TracTickets for help on using tickets.