Opened 11 years ago
Last modified 6 years ago
#28156 new defect (bug)
In date-containing permalink structures, /dddd/dd/comment-page-d/ urls don't work
Reported by: | mboynes | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Permalinks | Keywords: | needs-patch dev-feedback needs-unit-tests |
Focuses: | Cc: |
Description
I was in the process of writing a plugin to allow people to test their rewrite rules as they develop a site, and when I setup examples of core rewrite rules, one of them was failing.
If you set your permalink structure to one containing dates, e.g. "Day and Name", one of the generated rewrite rules for posts is:
'([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]'
And later on, another rule is:
'([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]'
The URI /2014/5/6/comment-page-2/ would end up matching the earlier rule, looking for a post named "comment-page-2" published on 2014-05-06, instead of looking for comment page 2 in the... I actually don't even know what the comment-page URLs do. For me, the ones that work just redirect to the date archive.
I'm happy to patch this, but would like to hear from someone else on what exactly should be done done. Do the comment-page-n rules do anything? Can they just be removed?
Can confirm that.
The post url doesn't give me 404, but there are definetely some problems.
Eg.