Add docs for Searchable entity formatter, clarify Search variable field

Created on 11 September 2024, 3 months ago

Problem/Motivation

I want to link taxonomy terms on Repository Items to search facets, using the Searchable entity formatter. However, I found no mention of the Searchable entity formatter in the module README. It would be good to have an explanation of how this formatter can be used.

Also, at first I thought the value for the "Search variable" would be the facet "URL alias" used to generate the URL parameter for the facet, e.g. `subject_geographic`. Visiting the repository item give a fatal error "InvalidArgumentException: The Facet subject_geographic could not be loaded. in Drupal\facets\Utility\FacetsUrlGenerator->getUrl()".

Instead it turned out to be the machine name for the facet, `site_subject_geographic`. It would be helpful to relabel "Search variable" to be "Facet machine name". Is this value used for anything else? Or add a field description explaining how this value is used.

Perhaps validation could be added to ensure the text matches the machine name (or even offer a select with possible facet machine name options).

Feature request
Status

Active

Version

2.1

Component

User interface

Created by

🇳🇿New Zealand jonathan_hunt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024