Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using 'Facet block' as a view display, only 10 items max are listed. It should display 14 items for the facet field I selected.
If I change the facet field, content of the block changes also but there is still only 10 items listed
Comments
Comment #1
msizec CreditAttribution: msizec commentedComment #2
ajross CreditAttribution: ajross as a volunteer commentedIf this helps at all, the limit of ten gets set at line 167 of display_facet_block.inc of the Search API Views sub-module:
$limit = empty($this->view->query->pager->options['items_per_page']) ? 10 : $this->view->query->pager->options['items_per_page'];
You can manually change this from 10 to something else (or replace $limit in the $query_options array) and it will change the max limit of facets in the block. Afraid I don't know enough about Views to know why the attempt to get the items per page setting is failing so I don't have a real solution/patch. But this is a hack if you really need it until somebody is able to come up with the permanent fix.
Comment #3
jtkeith CreditAttribution: jtkeith as a volunteer commentedIf you replace this line 167:
With this:
Then the display can find the items_per_page as set in the Views UI. Probably needs someone smarter than me to create a respectable patch.
Comment #4
eugene.ilyin CreditAttribution: eugene.ilyin as a volunteer and at DrupalJedi commentedLooks like you're trying to report problem (actually I don't think that it's really a problem) for the search_api into the issue for module facet.