Bug 42555: (Bug 25314 follow-up) Destroyed labels for customized facets

After applying Bug 25314, customized facets generated from
mappings.yaml are displayed with the technical type_id instead of the
proper label.

Test plan:
==========
1. In KTD with Elasticsearch enabled, add the following to
   admin/searchengine/elasticsearch/mappings.yaml

  su-gen:
    facet_order: 33
    label: Genre/Form
    mappings:
    - facet: 1
      marc_field: 655a
      marc_type: marc21
      sort: 1
      suggestible: ''
    opac: 1
    staff_client: 1
    type: ''

   Reindex with: koha-elasticsearch --rebuild -r -d -b kohadev
2. In the OPAC, at the bottom of the facets area, you should see a
   facet labeled su-gen_id instead of Genre/Form.
3. Apply the patch ; restart_all.
4. The facet should now display the correct label: Genre/Form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Janusz Kaczmarek 2026-05-07 20:09:59 +02:00 committed by Lucas Gass
parent c64f707691
commit dbd51e342c
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@
[% CASE 'Languages' %]
<a [% attrs | $raw %] id="facet-languages">Languages</a>
[% CASE %]
<a [% attrs | $raw %] id="facet-[% facets_loo.type_link_value | html %]">[% facets_loo.type_id | html %]</a>
<a [% attrs | $raw %] id="facet-[% facets_loo.type_link_value | html %]">[% facets_loo.label | html %]</a>
[% END %]
<div class="facet-collapse collapse show" id="[% facets_loo.type_id | html %]_collapse">
<ul>