Making WordPress.org

Opened 3 years ago

Closed 3 years ago

#7013 closed defect (bug) (fixed)

Theme directory search handling breaks global search

Reported by: ryelle Owned by: coffee2code
Priority: normal Milestone:
Component: Theme Directory Keywords:
Cc:

Description

The global search bar is broken on Theme Directory, nothing happens when you try to search.

To reproduce:

  1. Visit ​https://wordpress.org/themes/ or a single theme like ​https://wordpress.org/themes/twentytwentythree/
  2. Click the search icon in the global header (not the theme search), the search opens
  3. Type any search terms
  4. Hit enter or click the search icon button
  5. Nothing happens

It should direct you to the global search page, wordpress.org/search, with your results. Instead, there's a JS error that TypeError: a.closest(...) is null

I think the theme's JS handling is accidentally grabbing the global search, but the different markup causes the JS error that prevents the form from submitting.

Props to @nielslange for the initial report.

Change History (3)

#1 @renyot
3 years ago

  • Owner set to renyot
  • Status new → accepted

#2 @coffee2code
3 years ago

  • Owner changed from renyot to coffee2code
  • Status accepted → assigned

I know the cause of this. Fix incoming.

#3 @coffee2code
3 years ago

  • Resolution → fixed
  • Status assigned → closed

In 12604:

Theme Directory: Limit the categorization JS to its respective form.

Prevents a JS error and interfering with other JS.

Props nielslange. ryelle, coffee2code.
Fixes #7013.

Note: See TracTickets for help on using tickets.