I have the adminimal theme as admin theme and enabled the module for a facet. The field is indexed as string. If i type in my filter in the search form nothing happens. I would expect that all facet items who not match the search would hide. I am using Using jquery 1.7.2 but i have tested it with all versions between 1.7 and 1.10

Jquery error: Uncaught TypeError: Cannot read property 'length' of null
Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: field-recommended-by

Comments

fox_01 created an issue. See original summary.

fox_01’s picture

Issue summary: View changes
fox_01’s picture

Issue summary: View changes
semanthis’s picture

this problem seems to appears if you use related fields as facets. Then $form['#facetapi']['facet']['name'] contains a colon (':'). JQuery denotes the colon as a pseudo-class, but in Your case there is no pseudo-class "length", because such pseudo-class doesn't exists. Actually in the id used by Facetapi - and which should be addressed by the script, the colon is not escaped but removed.

Very short solution is to change line 44 in facetapi_search.module by

'id' => 'facet-' . (str_replace(':', '', str_replace('_', '-', $facet['name']))),

this way the colon is removed and everything should work.

I'm working on a heavyly modified version of the module without versioning - I first would need to checkout a original version - so it would be great if You could create a patch. Thanks

bmeme’s picture

Usually it would be better if you create a patch starting from 7.x-1.x branch and upload it to this issue. In this way we can test your fixes/improvements and, if all will be ok, then release a new version of this module based on your contribution. Obviously we will assign you credits :)

nwom’s picture

I was having the same issue. Here is a patch, thanks to semanthis work

nwom’s picture

Same patch, but this time without the whitespace issue

nwom’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Needs review
nwom’s picture

bmeme’s picture

Assigned: Unassigned » aronne

  • aronne committed f6bfbdd on 7.x-1.x authored by NWOM
    Issue #2646872 by NWOM: Does not filter
    
aronne’s picture

Status: Needs review » Closed (fixed)

Fixed in 7.x-1.1

Thx NWOM.