WordPress.org

Making WordPress.org

Opened 12 months ago

Closed 7 weeks ago

Last modified 7 weeks ago

#4322 closed defect (fixed)

Invalid length search inputs should be handled more cleanly

Reported by: jonoaldersonwp Owned by: 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
12 months 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.


11 months ago

#3 in reply to: ↑ 1 @dd32
7 weeks 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
7 weeks 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
7 weeks ago

Nice one! :D

Note: See TracTickets for help on using tickets.