E
E
Evgeny Makov2016-10-26 16:13:13
Drupal
Evgeny Makov, 2016-10-26 16:13:13

Drupal, Search Api Ajax and Media Center theme, strange facet behavior, how to fix?

In Garland's (standard) theme, the module works fine with these settings

<?php
function ajaxified_catalog_search_api_ajax_modules_alter(&$modules) {
$modules[] = 'block';
}

/**
* Implements hook_search_api_ajax_settings().
*/
function ajaxified_catalog_search_api_ajax_settings() {
$settings = array(

// required: CSS ID for the main content (search results html)
'content' => '.region.region-content',

// required: array of regions with search -related blocks => CSS ID's
'regions' => array(
'sidebar_first' => '#sidebar-first',
'sidebar_second' => '


// optional: if you want to show a spinner image on AJAX
/*'spinner' => drupal_get_path('module', 'search_api_ajax').'/spinner.gif'*/

);

return $settings;
}?>
In the Media Center theme, there is an error "jquery.js:5986 Uncaught TypeError: Cannot read property 'createDocumentFragment' of undefined" which I have been struggling with for the second day.
2032756832df4bf09b4996be7d7234e8.png
The HTML markup is the same. Anyone can help?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Makov, 2016-11-07
@ezhmkv

By mistake and a small amount of sleep, I registered two regions settings at once in two modules and two sidebars came to the array.

A
afi13, 2016-10-27
@afi13

Hard to tell without theme code, see if Media Center requires a newer version of jQuery.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question