This is how one can realize the problem

- we enable entity translation to taxonomy terms
- we enable second languge LANG2 so we have EN + LANG2 with EN as default
- we create a translatable (or locilizable) vocabulary VOC1
- in manage fields of VOC1 we replace name with title_field name
- we create TERM1_EN and translate it to TERM1_LANG2
- we make basic page entity translatable
- we add term reference or even entity reference to BASIC PAGE referencing VOC1 lets say with list widget (but works with any widget checkboxes,list,autocomplete)
- on the EN/node/add/page everything looks OK and we can see VOC1 and select box with TERM1_EN
- if we go to LANG2/node/add/page VOC1 has a select box that is empty
- where is TERM1_LANG2 ?

should n't title module be responsible of finding the relevant select boxes and replacing term names with the title_field of correct language ? or am I missing something ?

CommentFileSizeAuthor
#3 title.code_.1920096-3.patch1.65 KBJohnny vd Laar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Volx’s picture

The terms are probably invisible, because you have enabled the i18n_taxonomy and set the i18n_mode to something different than 0 (no translation) and i18n_taxonomy filters out all terms that have a different language than the current, since it doesn't know about the entity translation. If you disable i18n_taxonomy or set the i18n_mode to 0, you will see the term, but it will not be translated, that is another issue. I recommend not using i18n_taxonomy and Entity Translation/Title at the same time.

For everything but the autocomplete widget this is fixed by #1557708: Support for taxonomy_options_list which in turn should be fixed by #1944246: taxonomy_allowed_values should use entity_label. The autocomplete widget should probably also be fixed within the Taxonomy module, but that will be a bit more complicated, so that remains an open issue.

jneubert’s picture

Quite similar, but I'm not sure these are duplicates: http://drupal.org/node/1914306

Johnny vd Laar’s picture

FileSize
1.65 KB

I have patched the title module with code based on the patch in #1944246: taxonomy_allowed_values should use entity_label

This way you don't have to patch the taxonomy module.

Johnny vd Laar’s picture

Status: Active » Needs review
plach’s picture

Title: Title incompatibility with Term reference/entity reference widgets » Title incompatibility with the entity reference widget
Status: Needs review » Active

#3 looks good to me, thanks: I committed and pushed it with some minor adjustment.

Setting status back to active since entity references are still SOL.

hoporr’s picture

#3 did at least solve part of the problem for me. Thank you, Johnny. I'd like to still see this go forward into the next release of 'title'

kristiaanvandeneynde’s picture

Issue summary: View changes

For some reason the options_list_callback is still NULL, making this code not function. I've cleared caches a lot, but field_read_fields() returns a dataset with an empty options_list_callback...

EDIT: It's because hook_field_info_alter() doesn't affect already existing fields.

  • Commit 0d9c63b on 7.x-1.x, workbench authored by Johnny vd Laar, committed by plach:
    Issue #1920096 by Johnny vd Laar | GiorgosK: Fixed Title incompatibility...
Zekvyrin’s picture

Status: Active » Closed (fixed)

Confirms that it solved my issue and it's working with dev version.

As the patch has been commited, I guess we can close this issue..

Thanks everyone

Zekvyrin’s picture

Status: Closed (fixed) » Fixed
plach’s picture

Status: Fixed » Active

See #5.

kopeboy’s picture

SOL?

plach’s picture

Sadly Out of Luck :)

badrange’s picture

I wonder: Is this a problem if you use i18n_taxonomy for taxonomy term translation? Or with entity_translation? Or both?