Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#22210 closed defect (bug) (duplicate)

Permalink 404 when re-using trashed page's permalink

Reported by: clorith's profile Clorith Owned by:
Milestone: Priority: normal
Severity: major Version: 3.4.2
Component: Permalinks Keywords:
Focuses: Cc:


When creating a post with the same permalink as a page that has been trashed (not permanently deleted) the page will 404 presuming the page to be non-existant.

This does not take into account which post/page was created first, if there is a trashed page it will 404.

Can be replicated as follows:

  • Create a page with any title
  • Publish the page
  • Move the page to trash (do not permanently delete the page)
  • Create a new post with the same title
  • Publish the post and try viewing it

When permanently deleting the page this is no longer an issue, also the title can be anything as long as the permalink is identical to the trashed article.

This was brought up in #19333 with version 3.2.1 as well, but appears to have been related to a misconfigured htaccess file/webserver at the time.

Attachments (1)

22210.diff (812 bytes) - added by kovshenin 12 years ago.
Check the page post status before verifying a match

Download all attachments as: .zip

Change History (5)

#1 @kovshenin
12 years ago

I couldn't reproduce this until I switched my permalink settings to /%postname%/.

#2 @Clorith
12 years ago

Yes, I am using /%postname%/ as well.

#3 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #21970.

12 years ago

Check the page post status before verifying a match

#4 @kovshenin
12 years ago

@SergeyBiryukov is way too fast :) will upload my patch to the other ticket.

Note: See TracTickets for help on using tickets.