It would be nice if this module could integrate with Facets module to provide "Transform entity ID to label" option.

Currently, facet provides only "DE", "US" ... country name labels. This is not so convenient for search purposes. "Germany", "United States" ... would be much better.

Issue fork country-3187133

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

devad created an issue. See original summary.

devad’s picture

Issue summary: View changes
devad’s picture

Issue summary: View changes
devad’s picture

I have hoped that #3081862: Render country name as token commit will make facet configuration flexible... but no luck.

I have tested further and Facets' "List item label" option does not have any effect on Country labels.

If this option is not selected country uppercase keys are displayed, and if it is selected the uppercase keys are displayed again.

So, I suppose that this issue might be some kind of a bug as well... not only the feature request.

Is there any workaround maybe how to force facet to display full Country names?

devad’s picture

fmb’s picture

In my opinion, the correct way would be to write a Facets plugin.

fmb’s picture

Status: Active » Needs review

In order to test this MR, check "Country name" in facets settings.

batigolix’s picture

Status: Needs review » Reviewed & tested by the community

I tested this and it works nice.

What is missing is documentation that explains how to set it up (especially the "Country name" setting in the facet.)
But as this module does not have a README, we would need a separate issue for this.

So I mark this RTBC.

batigolix’s picture

dakala’s picture

@batigolix Thanks for all your work on issues. Would you be able to help update the README please? Once that's done, we can merge and release a new version. Once again, thanks.

batigolix’s picture

Status: Reviewed & tested by the community » Needs work
batigolix’s picture

@dakala: the fork needs to be updated so that it contains a readme so it becomes possible to update it. But I dont know how to update the fork.

As an alternative I can create a new ticket for updating the readme.

dakala’s picture

Status: Needs work » Fixed

@batigolix: No worries. I don't know how to update forks either. Let's go for the easiest option. I'll merge this now, since it's been tested and marked RTBC before. I'll leave the update to the README in your able hands.

  • dakala committed 95f78805 on 8.x-1.x authored by FMB
    Issue #3187133 by FMB, devad, batigolix: Facets integration
    
devad’s picture

I tried a .dev committed Facets plugin and it works nicely. Thanks all. Great job!

Is it possible to create a similar Facets plugin for Flags module maybe... so that Country flag + Country name can be displayed inside the facets as well.

I have created a feature request here: #3386287: Facets integration for Country flag + Country name

Status: Fixed » Closed (fixed)

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

batigolix’s picture

@dakala:

I created an issue (with patch) for the improvement of the readme: #3390684: Improve README.md

introfini’s picture

To assist others facing the same issue, ensure that the "Ignore Case" processor is not enabled on your index for the country field. The country codes are stored in uppercase, and the countryManager->getList() method returns keys in uppercase as well. Any conversion to lowercase will cause the functionality to break.