Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#21138 closed defect (bug) (fixed)

Comments rewrite contains bogus rule

Reported by: nacin Owned by: nacin
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Rewrite Rules Keywords: has-patch commit 3.6-early
Focuses: Cc:

Description (last modified by nacin)

[comments/feed/(feed|rdf|rss|rss2|atom)/?$] =>

[comments/(feed|rdf|rss|rss2|atom)/?$] =>

[comments/page/?([0-9]{1,})/?$] =>

That last rule doesn't make any sense. We should call generate_rewrite_rules() with $paged = false here.

Attachments (1)

comments-rewrite.diff (652 bytes) - added by wonderboymusic 3 years ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
3 years ago

  • Description modified (diff)

I found this when porting over the test_query.php unit tests:

// 'comments/page/?([0-9]{1,})/?$' => 'index.php?&paged=$matches[1]',
function test_comments_page() {
       $this->assertQueryTrue('is_home', 'is_paged');

#2 @SergeyBiryukov
3 years ago

Introduced in [1910].

#3 @wonderboymusic
3 years ago

  • Keywords has-patch added

#4 @nacin
3 years ago

  • Keywords commit 3.6-early added
  • Milestone changed from 3.5 to Future Release

#5 @helen
3 years ago

  • Milestone changed from Future Release to 3.6

#6 @nacin
3 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 23524:

Remove bogus pagination rules from the comments permastruct. (As in, comments/page/?([0-9]{1,})/?$.) props wonderboymusic, fixes #21138.

Note: See TracTickets for help on using tickets.