indexdata / mkdru_ding

4 stars 3 forks source link

no searches ever send from mkdru_ding #2

Open jakub-id opened 13 years ago

jakub-id commented 13 years ago

This is running the latest mkdru with patches from ramlev (22f798a1d8fe471d556bf7c1c2dcb706afdcb431). The site in question:

http://phmetropol.stg.ding.dbc.dk/

Configuration double checked and working OK, in Firebug I can see that no Ajax request is ever sent from mkdru. Looks like the search query isn't passed to mkru or mkdru has broken auto-search. No errors in the console. Jason, re-assign if you feel this was introduced with the latest patches.

skomorokh commented 13 years ago

I took a look around. Luckily enough, I do get a Javscript error when that happens:

Error: Drupal.settings.dingFacetBrowser is undefined Source File: http://phmetropol.stg.ding.dbc.dk/sites/all/modules/mkdru_ding/mkdru_ding.js?lr5e5a Line: 30

The line in question:

mkdru_ding.populateFacetContainer = function () { $(Drupal.settings.dingFacetBrowser.mainElement).html(Drupal.theme('mkdruFacetContainer', mkdru.facets)); };

In the previous version of mkdru_ding we had a similar setting where we stored the CSS selector for the facet container:

mkdru_ding.populateFacetContainer = function () { $(Drupal.settings.mkdru_ding.facetContainerSelector).html(Drupal.theme('mkdruFacetContainer', mkdru.facets)); }

This setting was passed in from mkdru_ding.module via drupal_add_js() thusly:

drupal_add_js(array('mkdru_ding' => array('facetContainerSelector' => '#block-ding-facetbrowser-facetbrowser')), 'setting');

Hasse took that part out... but his comment "Use facet browser element from ding_facetbrowser." and the fact it's not looking under Drupal.settings.mkdru_ding lead me to believe that it's not supposed to come from any of the mkdru stuff, that the facet browser module (or whatever module it's in) is not enabled on that site or not exposing that setting for some reason. There is a "Ding facet" module which is checked off but complains of a missing dependency on a "Test search" module, perhaps that's it?

I think we'd best defer to Hasse on this.