Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When adding an entity reference field as a filter (one that refers to a taxonomy term), the terms are not translated. Render views filter as select list is enabled in the field settings.
This patch replaces $term->name with a call to entity_label.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1865756-8.patch | 935 bytes | rpayanm |
#5 | entityreference-localize-taxonomyterm-name-1865756-5.patch | 910 bytes | peterpoe |
entityreference-localize-taxonomyterm-name-D7.patch | 1.05 KB | Stevel | |
Comments
Comment #1
Stevel CreditAttribution: Stevel commentedFor information: I looked at #1857608: Translation doesn't affect exposed term filters due to bypassing entity system for the idea of this fix.
Comment #2
e0ipsoentityreference-localize-taxonomyterm-name-D7.patch queued for re-testing.
Comment #3
milos.kroulik CreditAttribution: milos.kroulik commentedThe patch no longer apply. I will try to patch manually.
EDIT: Code is now completely different, will need another patch.
Comment #4
milos.kroulik CreditAttribution: milos.kroulik commentedComment #5
peterpoe CreditAttribution: peterpoe commentedNew patch, using handler method getLabel() instead of calling directly entity_label().
Comment #6
chaloalvarezj CreditAttribution: chaloalvarezj commentedHi there,
I have this problem in the latest stable version on entity reference (7.x-1.5), but the patch in #5 doesn't seem to apply as the code has changed.
Has anybody else found this problem recently? How to Fix it?
Thank you.
Edit: Never mind! It is working! I did not have my terms translated.. Sorry.
Comment #7
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 4 year old patch in #5 to EntityReference_SelectionHandler_Generic.class.php does not apply to the latest 7.x-1.x-dev and if still relevant needs a reroll.
Comment #8
rpayanmComment #9
rpayanm