Hey there,

I was getting a settings.facetapi is undefined js error when using the dialog api module (jquery UI) on any page with a facet block.

I put together a simple patch that fixes it (and it doesn't even break facetapi!).

Cheers

CommentFileSizeAuthor
facetapi_js_error.patch1.48 KBjptaranto

Comments

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

I think the defensive coding is good here.

Out of curiosity, what widget are you using? I am trying to figure out why there would be no settings passed for the facet.

Thanks for the patch,
Chris

jptaranto’s picture

Awesome dude.

The error was getting thrown when I opened a page via the (rather beta) Dialog API module. It just uses the jQuery UI .dialog() widget. Probably not caused by dialog() though, and more likely to be something to do with Dialog API's AJAX and loading of js already on the page.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Resolved in commit http://drupalcode.org/project/facetapi.git/commit/c956607.

Congrats on becoming the 21st code contributor to Facet API!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.