diff --git a/README.txt b/README.txt index f27bdbd..89a25df 100644 --- a/README.txt +++ b/README.txt @@ -30,14 +30,12 @@ After adding one of those, you can add a facet on the facets configuration page: If you're using Search API views, make sure to disable views cache when using facets for that view. - FAQ --- Q: Why do the facets disappear after a refresh. A: We don't support cached views, change the view to disable caching. - FEATURES -------- diff --git a/facets.install b/facets.install index a1b0372..046b8ae 100644 --- a/facets.install +++ b/facets.install @@ -2,7 +2,7 @@ /** * @file - * Updates. + * Update hooks for the facets module. */ use Drupal\facets\Entity\Facet; diff --git a/src/Form/FacetForm.php b/src/Form/FacetForm.php index cb0f26a..f638059 100644 --- a/src/Form/FacetForm.php +++ b/src/Form/FacetForm.php @@ -373,7 +373,7 @@ class FacetForm extends EntityForm { '#options' => [0 => $this->t('No limit')] + array_combine($hard_limit_options, $hard_limit_options), '#description' => $this->t('Display no more than this number of facet items.'), ]; - if (strpos($facet->getFacetSourceId(), 'views_') === FALSE) { + if (strpos($facet->getFacetSourceId(), 'search_api') === FALSE) { $form['facet_settings']['hard_limit']['#disabled'] = TRUE; $form['facet_settings']['hard_limit']['#description'] .= '
'; $form['facet_settings']['hard_limit']['#description'] .= $this->t('This setting only works with Search API based facets.'); @@ -391,7 +391,7 @@ class FacetForm extends EntityForm { '#title' => $this->t('Use hierarchy'), '#default_value' => $facet->getUseHierarchy(), ]; - if (strpos($facet->getFacetSourceId(), 'views_') === FALSE) { + if (strpos($facet->getFacetSourceId(), 'search_api') === FALSE) { $form['facet_settings']['use_hierarchy']['#disabled'] = TRUE; $form['facet_settings']['use_hierarchy']['#description'] = $this->t('This setting only works with Search API based facets.'); } @@ -439,7 +439,7 @@ class FacetForm extends EntityForm { '#maxlength' => 4, '#required' => TRUE, ]; - if (strpos($facet->getFacetSourceId(), 'views_') === FALSE) { + if (strpos($facet->getFacetSourceId(), 'search_api') === FALSE) { $form['facet_settings']['min_count']['#disabled'] = TRUE; $form['facet_settings']['min_count']['#description'] .= '
'; $form['facet_settings']['min_count']['#description'] .= $this->t('This setting only works with Search API based facets.');