WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 5 months ago

#43544 new defect (bug)

Pages over 999 in archive return 404

Reported by: 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
16 months ago

Possibly related #7467 and #5305

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

#2 @soulseekah
16 months ago

  • Keywords reporter-feedback added

#3 in reply to: ↑ 1 @catalinnita
16 months 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
16 months 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
5 months ago

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