Make WordPress Core

Opened 10 years ago

Last modified 4 years ago

#29669 new enhancement

Static base in permalink_structure unexpectedly sets $wp_rewrite->front value

Reported by: danielbachhuber's profile danielbachhuber Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: needs-patch
Focuses: Cc:


When I use a permalink structure like /story/%post_id%/%postname%/, the author and date URLs inherit the same /story/ base (e.g. /story/author/danielbachhuber/). I'd expect my author and date URLs to remain unchanged, unless I explicitly specify a base.

There appears to be some crude %post_id% conflict resolution for date which forces this. It's not clear why the front value is applied to author_structure.

This code is 9 years young (#2433), so probably too late to make a breaking change. It would be nice to have a filter around $wp_rewrite->front in $wp_rewrite->init() so I don't have filter both rewrite rules and links.

Change History (4)

This ticket was mentioned in Slack in #core by jorbin. View the logs.

9 years ago

#2 @jorbin
9 years ago

  • Type changed from defect (bug) to enhancement

I think a filter here makes sense. I'm hesitant to make a change to every sites permalinks. At this point, it may as well be a feature so I'm going to reclassify this as an enhacement.

A patch that adds the filter and a simple plugin to demonstrate the usefulness of a filter would help move this forward.

#3 @danielbachhuber
9 years ago

I'll see what I can do about that.

#4 @earnjam
4 years ago

  • Milestone set to Future Release

The description on the permalinks page does say "a custom URL structure for your permalinks and archives"

I think that implies author and date archives would be included as well, though there could be room to clarify more.

Note: See TracTickets for help on using tickets.