Make WordPress Core

Opened 12 years ago

Last modified 6 years ago

#29669 new enhancement

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

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

Description

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.


11 years ago

#2 @jorbin
11 years ago

  • Type defect (bug) → 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
11 years ago

I'll see what I can do about that.

#4 @earnjam
6 years ago

  • Milestone → 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.