Making WordPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#4322 closed defect (bug) (fixed)

Invalid length search inputs should be handled more cleanly

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: dd32's profile dd32
Milestone: Priority: lowest
Component: General Keywords: seo analytics
Cc:

Description

Very long search requests, such as this one currently outputs malformed canonicals, hreflang values, rel next vals, etc.

Specifically, the values for these either output an additional trailing slash (e.g., https://wordpress.org/plugins/search//), or, output a chunk of the raw URL.

In both cases, the value for these tags should be https://wordpress.org/plugins/search/.

Change History (5)

#1 follow-up: @Otto42
5 years ago

For reference, the exact breakage point seems to be at 1600 characters. I suspect this to be a limit in the underlying search engine.

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


5 years ago

#3 in reply to: ↑ 1 @dd32
5 years ago

Replying to Otto42:

For reference, the exact breakage point seems to be at 1600 characters. I suspect this to be a limit in the underlying search engine.

After a lot of digging around, I found the culprit - WordPress.

r25632 added an upper bound of 1600 characters for search requests, just ignoring it after that.

The plugin directory actually limits it to 200char for searching purposes, but it's discarded by core prior to that point.

#4 @dd32
5 years ago

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

In 9488:

Plugin Directory: Search: When a search request >=1600 characters is made, redirect back to the homepage like we do with empty searches.

Fixes #4322.

#5 @jonoaldersonwp
5 years ago

Nice one! :D

Note: See TracTickets for help on using tickets.