I have a facet that is a entity reference to taxonomy vocabulary. In the vocabulary I have terms with special characters as äüö
The search by this facet terms works but the label is shown without this special characters, for example I see "Munchen" instead of "München".

In "src/Plugin/facets/query_type/SearchApiString.php", in the function build(), the $result has just two values, "count" and "filter".
And the Result object is created just with this two values:
new Result($result_filter, $result_filter, $count);
I miss something like original term label or something like that.

I thought that maybe the option "Transform entity id into label" in facet setting can fix this problem but at the moment I cannot try because of the issue https://www.drupal.org/node/2777217, I have tried the patch and I don't see any more the error but I don't see the facet list either.

Comments

dimr created an issue. See original summary.

borisson_’s picture

Version: 8.x-1.0-alpha7 » 8.x-1.x-dev
Priority: Major » Normal
StatusFileSize
new1.96 KB

Thanks for the bugreport!

I wanted to write a test for this, but I noticed something else that I'd like to fix in another issue - storing the testcase here to go hunt that down further.

borisson_’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: facet_labels_doesn_t-2838247-2.patch, failed testing.

borisson_’s picture

Status: Needs work » Needs review
StatusFileSize
new922 bytes
new1.8 KB

I have the patch from #2839142: Not all fields from the index config make it to the index. applied, but that makes this pass. This means I can't reproduce your issue.
The patch proves ƒäüö, aáå, test_key-word and special^%s are valid facet values.

borisson_’s picture

StatusFileSize
new920 bytes
new1.86 KB

Add a testcase with spaces.

The last submitted patch, 5: facet_labels_doesn_t-2838247-5.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 6: facet_labels_doesn_t-2838247-6.patch, failed testing.

borisson_’s picture

Committed, thanks!

  • borisson_ committed 010a979 on 8.x-1.x
    Issue #2838247 by borisson_: Facet labels doesn't show special term...
borisson_’s picture

Status: Needs work » Fixed
dimr’s picture

Thanks to you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dimr’s picture

does an issue already exist to fix this? Sorry, I looked for it but I didn't find it.

borisson_’s picture

No issue exists for fixing because I couldn't reproduce this, what we did in this issue is create a new one. It allows for creating of ƒäüö, aáå and special^%s.

Can you open a new issue with detailed steps to reproduce and can you make sure that the transliteration option for search api is not set on this field? You can link to this issue for background info as well.

That'd be awesome.