WordPress / Learn

WordPress.org Learn - The canonical source for the code and content behind https://learn.WordPress.org
239 stars 85 forks source link

Filtering search results by language is broken #2577

Open adamwoodnz opened 1 week ago

adamwoodnz commented 1 week ago

Steps to reproduce:

  1. Navigate to an archive, eg. https://learn.wordpress.org/courses/?new-theme=1
  2. Enter a search term that you can see in the title or excerpt of one of the cards, eg. 'friendly' exists in the excerpt of the Beginner WordPress User course
  3. Submit the results and you should land at https://learn.wordpress.org/?s=friendly&post_type=course with results.
  4. Filter the results by language. At present Italian is the only option.

Expected: No results as all the courses from the search are in english

Actual: The same result set as without the filter

With search, no language With search, and language
Image Image

Note that filtering all courses by language does work https://learn.wordpress.org/courses/?language%5B%5D=it_IT&post_type=course

Image

pkevan commented 5 days ago

This is slightly complicated for a couple of reasons: