Making WordPress.org

Opened 5 months ago

Closed 4 months ago

#7815 closed defect (bug) (fixed)

Photo Directory: Can't combine search and taxonomy filtering

Reported by: ryelle's profile ryelle Owned by:
Milestone: Priority: normal
Component: Photo Directory Keywords: has-patch
Cc:

Description

The new design will enable searching combined with the taxonomy filters, for example on the Theme Directory you can search for "school" themes with the accessibility-ready tag. This is native functionality in core, but isn't working on the Photo Directory.

For example, this photo has "vibrant" in the alt text, and is tagged with the color blue. But nothing appears in the result here: https://wordpress.org/photos/search/vibrant/?photo_color=blue

Locally, I see an error "Not unique table/alias: 'wp_term_relationships'". It appears the customization for search results is conflicting with the core behavior.

Attachments (1)

7815.diff (1.1 KB) - added by ryelle 5 months ago.

Download all attachments as: .zip

Change History (5)

@ryelle
5 months ago

#1 @ryelle
5 months ago

  • Keywords has-patch added

7815.diff adds table aliases for the joined tables, which in combination with the patch on #7814 makes the search work as expected and prevents the table collisions in my local env. But like #7814, this isn't working on my sandbox.

#2 @coffee2code
4 months ago

In 14181:

Photo Directory, Search: Prevent table name collisions in searches with an explicit taxonomy.

Props ryelle.
See #7815.

#3 @ryelle
4 months ago

In 14224:

Photo Directory: Prevent ElasticSearch from being used on search results.

When active, ElasticSearch takes over the searching process and ignores the customization to search custom taxonomies, and prevents the core behavior of combining search and taxonomy filtering. Disabling it allows the search code to run as expected.

See #7814, #7815

#4 @coffee2code
4 months ago

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

Fixed as a result of [14224]. Also see comments in #7814.

Note: See TracTickets for help on using tickets.