[wp-trac] [WordPress Trac] #11931: Day/Month/Year Permalink Structure Fails in Archives

WordPress Trac noreply at wordpress.org
Fri Apr 5 15:44:12 UTC 2019


#11931: Day/Month/Year Permalink Structure Fails in Archives
---------------------------+-------------------------
 Reporter:  Frenzie        |       Owner:  (none)
     Type:  enhancement    |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Rewrite Rules  |     Version:  2.8.6
 Severity:  normal         |  Resolution:  worksforme
 Keywords:                 |     Focuses:
---------------------------+-------------------------
Changes (by danielbachhuber):

 * keywords:  needs-patch needs-testing =>
 * status:  assigned => closed
 * resolution:   => worksforme
 * milestone:  Future Release =>


Old description:

> If you use a permalink structure with %day%/%monthnum%/%year% then the
> archives automatically become date/%day%/%monthnum%/%year%. Wordpress
> automatically makes the links to monthly archives date/01/2010 etc (which
> is good), but if you go to it you get a 404 not found.
>
> Reproduce using for example
> /%post_id%/%postname%/%day%/%monthnum%/%year%/
>
> I "fixed" it with this plugin I wrote, but it will probably fail when
> things like /page/2/ come into play (that wasn't really important yet).

New description:

 If you use a permalink structure with %day%/%monthnum%/%year% then the
 archives automatically become date/%day%/%monthnum%/%year%. WordPress
 automatically makes the links to monthly archives date/01/2010 etc (which
 is good), but if you go to it you get a 404 not found.

 Reproduce using for example /%post_id%/%postname%/%day%/%monthnum%/%year%/

 I "fixed" it with this plugin I wrote, but it will probably fail when
 things like /page/2/ come into play (that wasn't really important yet).

--

Comment:

 I tried and was unable to reproduce this issue in WordPress 5.2

 When I set my permalink structure to
 `/%post_id%/%postname%/%day%/%monthnum%/%year%/`, my blog post loaded as
 expected at `http://wordpress-develop.test/1/testing-a-new-
 draft/05/04/2019` and I was able to access a date archive at `http
 ://wordpress-develop.test/date/05/04/2019` as expected.

 Feel free to re-open if there are other steps that reproduce this issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/11931#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list