When using "rendered taxonomy term" as format in the manage display of the node for the term, you'll get a [language] translation unavailable for [term] message when viewing the node.

More info:
I have 3 languages; English, Dutch & French.
I have a custom content type "page" with "field translation" enabled. This page has a term reference field "country".
This field has translation disabled (as I want changes to this field to be synced over the 3 languages).

The vocabulary "countries" is also enabled for field translation. Each term is a country and has a flag attached to it as en extra image field. The name of each country is translated in the 3 languages.

On this vocabulary I have added an extra view mode (via the display suite module) named "country-flag" which shows the country name and the flag.

On the page content type I have created a "full content" view mode (also via the display suite module). In this view mode I have set the format of the term "country" to be "rendered taxonomy term" with view mode "country-flag". This results in the above "error".

Setting the view mode to "plain text" fixes the error and shows each country name in its appropriate language.

Can anyone help me fixing this please?

Thanks!

---

Edit: I just tried this with an entity reference field instead of a term reference and the problem is the same.
Something must be wrong with entity translation and showing a term as "rendered taxonomy term" (or entity reference as "rendered entity") on the display of content type.

Comments

bartvdputte’s picture

Extra: setting the term reference field "country" on the page content type as "translation enabled", then it works. But it has the drawback that changes are no longer synced over the languages which is not preferred as these kind of changes are valid for all languages.

bartvdputte’s picture

Issue summary: View changes
bartvdputte’s picture

I *think* this patch solves it with entityreference: https://drupal.org/comment/7328662#comment-7328662

BUT the same misery remains for taxonomy terms...

dave reid’s picture

Project: Entity Translation » Display Suite
Version: 7.x-1.0-beta3 » 7.x-2.x-dev
Component: Base system » Code

It looks like the "rendered taxonomy term" formatter is provided by the Display Suite module. Indeed that formatter should apply the same fix as #1674792: Rendered entity is not language aware

dave reid’s picture

bartvdputte’s picture

bartvdputte’s picture

With the help of Dave Reid I could create 2 patches that fix my problem.

It's my first patch, and it's for 2 files so I created 2 patch files (I didn't know how I could create one in 1 go).

Can you test this and commit it into the final as I'm sure more people will have problems with this?

aspilicious’s picture

Status: Active » Fixed

Thnx committed the patch with small adjustments.

Status: Fixed » Closed (fixed)

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