marked as critical as it has been suggested this module is mandatory to be able to translate terms with fields attached (which is a core function).

module adds UI for doing this but doesn't actually do anything.

- i have existing terms
- i replace the Name of the term
- batch runs to supposedly move term names in to new term name field
- when i edit a term, name field exists but is empty
- when i go to translate tab i can translate the term
- translatable fields including Name show up
- i can add a translation

both Name and other fields are saved for both base language and alternate language - but these are not used anywhere that i can see:

- select list for a term reference field does not use these values
- title of the term page does not use them

seems sort of close; all the UI is in place and the values are being saved (although batch operation doesn't do anything); but doesn't appear that the saved info is used anywhere that we'd expect std use of taxonomy terms to be used.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liquidcms’s picture

Title: UI exists but does nothing for terms » name_field value not used anywhere for taxonomy

trying to sort out getting terms with fields working with translation but no luck so far. Sounds as though this module is key but it doesn't seem to do anything. It does seem to have the UI in place to replace term Name property with a field; but don't see that being used anywhere. What am i missing?

starting with the basic term admin page: http://screencast.com/t/4Kmi960RCpOz

where term names, even though have values in new name_field; do not show here.

first crack at debugging this and i see the taxonomy_overview_terms() builds this form and it calls taxonomy_get_tree() to get terms tree. This in turn directly pulls the term records from the taxonomy_term_data table which has no data for term name (as expected). There is no hooks called or drupal_alter to modify this data at all so i dont see where this is expected to be replaced by the name_field values.

Any hints?

laur3ntlapo’s picture

Same problem as #1

liquidcms’s picture

fyi, i posted a work around here #1572586: fields on terms are not translatable comment 22

and thanks for reporting - i think devs from both i18n and entity translation camps both think this works; so its unlikely without more people reporting this it will be looked at any time soon (perhaps fields on terms with multilingual sites is not too common yet?)

plach’s picture

I think this issue might be solved by #1519930: Use the upcoming entity_language() function to determine the entity language. If you find that this is actually the case please close this one.

guy_schneerson’s picture

We used the translation of the title field on a taxonomy with no problems until we recently installed the i18n module (we did not enable the Taxonomy translation module), and our taxonomy translations stooped working.

We are now looking at disabling the title module for taxonomy and using the i18n module instead, although I prefair the entity translation approach using the title field.

Pisco’s picture

The Title module definitely doesn't work anymore with taxonomy terms. I tested with a fresh install of

  • Drupal core 7.14
  • Entity API 7.x-1.0-rc3
  • Entity Translation 7.x-1.0-alpha1
  • Title 7.x-1.0-alpha2

I marked taxonomy term as translatable entity type and replaced the name field of my test vocabulary. If you click on list terms in the vocabulary overview, all term names are empty. I'm able to edit the terms and their translations, but the term names are never rendered, neither with core term reference nor with entity reference.

This used to work, either a change in Drupal core, Entity API or Entity Translation broke it.

plach’s picture

Not sure, but I think Entity API might have changed something. See #4.

Pisco’s picture

Pisco’s picture

I have posted an update on #1519930: Use the upcoming entity_language() function to determine the entity language, can this issue be marked as duplicate or closed? I think it doesn't make sense to scatter the information. What do you think?

plach’s picture

Status: Active » Closed (duplicate)

can this issue be marked as duplicate or closed?

yes :)

Pisco’s picture

thanks! :-)

plach’s picture

Status: Closed (duplicate) » Needs review
FileSize
2.67 KB

The straight bug fix has been split from #1519930: Use the upcoming entity_language() function to determine the entity language to fix the regression asap. As per #1519930-20: Use the upcoming entity_language() function to determine the entity language a tagged release will follow as soon as this is committed.

plach’s picture

Title: name_field value not used anywhere for taxonomy » Entity language handling broken

Better title

Pisco’s picture

Status: Needs review » Needs work

Thank you for splitting the patch! #12 does not work for replaced taxonomy term titles. #12 looks very different from #1519930-14: Use the upcoming entity_language() function to determine the entity language, I'm trying to figure out which parts are missing.

Pisco’s picture

Status: Needs work » Needs review
FileSize
5.57 KB

I'm not quite sure I'm doing the right thing here, but after staring at the the code in #12 and #1519930-14: Use the upcoming entity_language() function to determine the entity language for a long time, I think this is what the patch should look like.

plach’s picture

plach’s picture

Sorry, too fast.

Pisco’s picture

Status: Needs review » Reviewed & tested by the community

Wonderful. Tested the patch with migrate, searchapi, facetapi … and it works like a charm. Thank you plach! Looking forward to seeing a new alpha release soon!

plach’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks. A release will follow in minutes.

Pisco’s picture

Amazing, you're a rockstar! :-)

plach’s picture

And here it is: http://drupal.org/node/1617612. It should be available for download in 5 minutes.

plach’s picture

Priority: Critical » Normal
Status: Fixed » Needs review
FileSize
1.6 KB

Mmh, we are getting some notices when changing node language.

Pisco’s picture

Status: Needs review » Reviewed & tested by the community

#22 fixes the error message described in #1519930-27: Use the upcoming entity_language() function to determine the entity language when changing the language. Thank you!

plach’s picture

Priority: Normal » Critical
Status: Reviewed & tested by the community » Fixed

Committed and pushed, thanks.

Status: Fixed » Closed (fixed)

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

  • Commit 8a6dd22 on 7.x-1.x, workbench by plach:
    Issue #1586002 by plach, Pisco | liquidcms: Fixed Entity language...
  • Commit e4988d6 on 7.x-1.x, workbench by plach:
    Issue #1586002 by plach, Pisco: (follow-up) Fixed notices when changing...