Commit 01731b07 authored by geerlingguy's avatar geerlingguy Committed by borisson_

Issue #2765177 by edgewl2, geerlingguy: Facets break search page until cache is cleared.

parent fe4e445a
......@@ -126,8 +126,10 @@ function facets_entity_presave(EntityInterface $entity) {
*/
function facets_preprocess_block(&$variables) {
if ($variables['configuration']['provider'] == 'facets') {
if (!empty($variables['derivative_plugin_id'])) {
$facet = Facet::load($variables['derivative_plugin_id']);
$variables['attributes']['class'][] = 'block-facets--' . Html::cleanCssIdentifier($facet->getWidget()['type']);
$variables['attributes']['class'][] = 'block-facet--' . Html::cleanCssIdentifier($facet->getWidget()['type']);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment