There are an error when faceting on Publication type.

If you select publication type first, it works as intended.
But if you select publication type as facet no 2 or no 3 etc, the search gets cleared out and just get filtered by publication type.

This two examples shows basically the same search, the only difference is that in the first one, publication type is filtered first, in the second, it get filtered last and clears out the filter on Key Words (that’s still in the query)

http://tvangspub.tvangsforskning.no/f/results/biblio_type:102+biblio_fie...

http://tvangspub.tvangsforskning.no/f/results/biblio_field:0.23:%22child...

Comments

yngvewb’s picture

I was able to find a workaround. Seems like the there is an error in the preg_match function in _biblio_facets_quoted_query_extract(). The query in $found_text is losing a " in the end of the string when Publication Type is faceted, and therefore the search gets cleared. If someone could fix that preg_match, it would have been wonderful. Untill then:

Added this line in biblio_facets.module line 38
// Fix for Publication Type bug http://drupal.org/node/944858
if ( (strlen($found_text) - 1 ) != strrpos($found_text, '"') ) $found_text = $found_text . '"';