Make WordPress Core

Opened 7 years ago

Last modified 6 years ago

#43544 new defect (bug)

Pages over 999 in archive return 404

Reported by: catalinnita's profile catalinnita Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.4
Component: Rewrite Rules Keywords: reporter-feedback
Focuses: Cc:

Description

Whenever you have more than 3 digits page numbers WordPress returns a 404.

Change History (5)

#1 follow-up: @soulseekah
7 years ago

Possibly related #7467 and #5305

What is your permalink structure? What URL are you trying to access?

#2 @soulseekah
7 years ago

  • Keywords reporter-feedback added

#3 in reply to: ↑ 1 @catalinnita
7 years ago

there is a conflict between 4 digits page numbers and year in permalinks.
for example if you go here http://www.radiotimes.com/news/page/3832/ it goes to 404 because it considers 3832 to be an year and is no archive page for that year of course.

could be this rule

[([0-9]{4})/?$] => index.php?year=$matches[1]

or a different one, I'm in the process of isolating it. I'll update the ticket when I'll find out.

Thank you!

Replying to soulseekah:

Possibly related #7467 and #5305

What is your permalink structure? What URL are you trying to access?

#4 @catalinnita
7 years ago

the problematic rule is

[(.+?)/([0-9]{4})/?$] => index.php?category_name=$matches[1]&year=$matches[2]

in my rules list it's before ( uncategorized is the category I am testing with )

[(uncategorized)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2]

setting the first rule at the end of the rules array it solves the issue.

#5 @boonebgorges
6 years ago

  • Component changed from Taxonomy to Rewrite Rules
Note: See TracTickets for help on using tickets.