Making WordPress.org

#7013 closed defect (bug) (fixed)

Theme directory search handling breaks global search

Reported by: ryelle's profile ryelle Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
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
11 months ago

  • Owner set to renyot
  • Status changed from new to accepted

#2 @coffee2code
11 months ago

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

I know the cause of this. Fix incoming.

#3 @coffee2code
11 months ago

  • Resolution set to fixed
  • Status changed from assigned to 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.