Opened 15 years ago
Last modified 6 years ago
#11931 reopened enhancement
Day/Month/Year Permalink Structure Fails in Archives
Reported by: | Frenzie | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8.6 |
Component: | Rewrite Rules | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
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).
Attachments (5)
Change History (12)
#1
@
14 years ago
- Keywords needs-patch added; permalink day/month/year removed
- Milestone changed from Unassigned to Future Release
- Type changed from defect (bug) to enhancement
#4
@
6 years ago
- Description modified (diff)
- Keywords needs-patch needs-testing removed
- Milestone Future Release deleted
- Resolution set to worksforme
- Status changed from assigned to closed
#5
@
6 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
There are no other steps than those in the OP.
#7
@
6 years ago
@danielbachhuber The one from the OP, /%post_id%/%postname%/%day%/%monthnum%/%year%/
. But the specifics don't matter much as long as it includes something like %monthnum%/%year%/
, %day%/%monthnum%/%year%/
, etc.
- The structure that wasn't mentioned in the OP works:
http://172.17.0.3/date/05/04/2019/
. http://172.17.0.3/date/04/2019/
is the default front page monthly archives link, which doesn't work.- I don't think
http://172.17.0.3/date/2019/
is directly accessible through the default theme, but in any case it also doesn't work when it should.
The workaround I attached a decade ago is still functional and it might even be borderline generic.
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 athttp://wordpress-develop.test/1/testing-a-new-draft/05/04/2019
and I was able to access a date archive athttp://wordpress-develop.test/date/05/04/2019
as expected.Feel free to re-open if there are other steps that reproduce this issue.