On a localized Drupal site if you make a free text search and then remove the filter the language code doubles up
so removing the "mobile phone" filter on this url:
http://testsite.local/en/search_page?search_api_views_fulltext=mobile+phone
Results in the following url:
http://testsite.local/en/en/search_page

This does not happen on facet filters:
http://testsite.local/en/search_page?f[0]=field_department%3A143

Comments

guy_schneerson’s picture

Ok i am on to it, both cases dont use the same code the free text uses the request_path() and that returns a url with the language code.
working on a patch will post shortly

guy_schneerson’s picture

This is what happens

  1. theme_facetapi_link_active() is given a url containing the language prefix
  2. it then calls theme_link()
  3. theme_link() calls url() that doubles up the prefix
guy_schneerson’s picture

Status: Active » Needs review
StatusFileSize
new798 bytes

This patch fixes it for me and should work on none localized sites, however did not test using other localization methods.

guy_schneerson’s picture

Component: Code » Current Search Blocks

sorry forgot to set component correctly

Status: Needs review » Needs work

The last submitted patch, doubles_up_language_prefix-1823162-3.patch, failed testing.

guy_schneerson’s picture

Status: Needs work » Closed (works as designed)

OK this is only relevant if you are using 7.x-1.0-rc4.
Looks like the latest dev version from git dosen't display the current search text with a remove link but haven't dived in to any depth as we will keep using rc4 until the next rc.

guy_schneerson’s picture

Issue summary: View changes

Updated issue summary.