Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#19036 closed defect (bug) (duplicate)

Id slugs don't display the post in singular view when one uses a custom slug for permalinks.

Reported by: atoon Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Permalinks Keywords:
Focuses: Cc:


When one uses a custom slug in permalinks (like /archives/%postname%/ rather than /%year%/%monthnum%/%postname%/), when the post get saved by default with the post id rather than a sanitized version of the title (which happens frequently for some reason), the post don't display in singular view. Perhaps it is part of the bugs that are going to be fixed in 3.3 regarding redirections, yet I want to be sure.

Change History (4)

#1 @duck_
10 years ago

  • Keywords reporter-feedback added

I'm afraid I don't follow you. Could you clarify the issue you're seeing? Preferably with a list of steps to reproduce, e.g.

1. Use "/archives/%postname%/" as permalink structure
x. Something unexpected happens

"when the post get saved by default" so autosave? "the post id rather than a sanitized version of the title" means the post ID is used in the permalink rather than the title?

Also try reproducing the problem after disabling all plugins and switching to the default theme.

#2 @atoon
10 years ago

  • Keywords reporter-feedback removed

Sorry, English is not my native language.

I did test with the default theme and no plugins and it persist. I will try to summarize:

By default, one can select a number of predefined options for posts "permalinks", and each one besides the default one can be setup in a custom way using tokens (%category%, %postname&, %year%, %post_id%, etc.) The default ones always work, but when one want to use a custom 'directory' before %postname% that is not formed by a token (like '/archives/%postname%', '/articles/%postname%', '/node/%postname%', etc.) AND a post has a slug that is the same as the post id (with a permalink like '/articles/2053/', generally if one forgot to put the title in first place and the post got auto saved), the post shows 404'd at its corresponding permalink (namely 'single/singular' view), yet it shows in the loop as always.

Note that one of the default options is '/archives/%post_id%'. That works because is using the 'post id' rather than the 'post name'. In the post where the problem occurs, the post name and post id are the same, so perhaps is related to the problem.

#3 @solarissmoke
10 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#4 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.