I am trying to display facets only if a "full text search" has been done.

From the facet block configuration , i have tried to restrict
Show for the listed pages : /my_search_api_view_url?*

or reversely to
Hide for the listed pages : /my_search_api_view_url

it does not work.

Comments

matoeil created an issue. See original summary.

borisson_’s picture

Issue tags: -Facet block

Thanks for reporting this issue, I haven't tested that yet, we should look into that.

Is it possible to provide an export of the block, so I can take a look at it with identical settings?

PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.

matoeil’s picture

Hi joris

Here is a block

uuid: 4d0cede5-ae23-4d01-8903-9771d62a8d02
langcode: en
status: true
dependencies:
config:
- facets.facet.campus
module:
- facets
- system
theme:
- bartik
id: campus
theme: bartik
region: content
weight: -4
provider: null
plugin: 'facet_block:campus'
settings:
id: 'facet_block:campus'
label: Campus
provider: facets
label_display: visible
visibility:
other_facet:
id: other_facet
facets: ''
facet_value: ''
negate: false
context_mapping: { }
request_path:
id: request_path
pages: '/my_search_api_view_url?*'
negate: false
context_mapping: { }

and the facet campus related to it

uuid: c4985bb8-8b6f-46a7-9323-0f0e8cb5d91a
langcode: en
status: true
dependencies:
config:
- views.view.index_articles
id: campus
name: Campus
url_alias: campus
weight: 0
show_only_one_result: false
field_identifier: field_campus
query_type_name: null
facet_source_id: 'views_page:index_articles__page_1'
widget:
type: links
config:
show_numbers: false
soft_limit: 0
query_operator: or
exclude: false
only_visible_when_facet_source_is_visible: true
processor_configs:
active_widget_order:
processor_id: active_widget_order
weights:
sort: -10
settings:
sort: DESC
count_widget_order:
processor_id: count_widget_order
weights:
sort: -10
settings:
sort: DESC
display_value_widget_order:
processor_id: display_value_widget_order
weights:
sort: -10
settings:
sort: ASC
list_item:
processor_id: list_item
weights:
build: 5
settings: { }
translate_entity:
processor_id: translate_entity
weights:
build: 5
settings: { }
url_processor_handler:
processor_id: url_processor_handler
weights:
pre_query: -10
build: -10
settings: { }
empty_behavior:
behavior: none
facet_configs: { }

borisson_’s picture

I tried to reproduce this and I can. I don't think this is a facets-specific issue though. The "pages" condition is provided by drupal core.

borisson_’s picture

Status: Active » Closed (won't fix)

This is a core-bug - not just a facets bug. Closing this.