i have some issues with an image field for a multilingual (2 languages) taxonomies.
i have images with same fid for both languages but i can't see for both terms edit forms.

it seems that the missing of the language argument for field_attach_form funcion was rhe reason
so using

field_attach_form('taxonomy_term', $term, $form, $form_state, $term->language);

instead of

field_attach_form('taxonomy_term', $term, $form, $form_state);

as it is for nodes made my day.

Comments

tim.plunkett’s picture

Status: Needs review » Active

Thanks for the bug report. This seems like a valid change.

Please read through Status settings for an issue.
For an issue to be needs review, it must have a patch. See instructions for Making a Drupal patch with Git.

oriol_e9g’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
StatusFileSize
new628 bytes
new628 bytes

Solve first in D8

Status: Needs review » Needs work

The last submitted patch, field-attach-language-1330974-2.patch, failed testing.

tim.plunkett’s picture

Issue tags: +Needs backport to D7

I knew I forgot something in my first comment.

@oriol_e9g in D8 everything is in a /core directory, it seems you left that out of the patch.

oriol_e9g’s picture

StatusFileSize
new648 bytes
oriol_e9g’s picture

Status: Needs work » Needs review

Yes I knew, this is the correct patch for D8.

Status: Needs review » Needs work

The last submitted patch, field-attach-language-1330974-5.patch, failed testing.

oriol_e9g’s picture

Status: Needs review » Needs work
StatusFileSize
new1006 bytes

I forgot to define the default language value.

oriol_e9g’s picture

Status: Needs work » Needs review
xjm’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests

Thanks @oriol_e9g. The addition of LANGUAGE_NONE to the default values makes sense.

The next thing we need here is an an automated test that fails without the patch from #8, and passes with it. Maybe the problem description in the issue summary can be used to devise a functional test.

dave reid’s picture

Category: bug » feature

This makes total sense, but is not at all a bug report considering taxonomy terms have no language concept in core. I just also don't want to give anyone any false ideas when looking at the code that languages are supported for terms out of the box.

xjm’s picture

Category: feature » task

Dave Reid pointed out that since core doesn't actually support multiple languages for taxonomy in D7, this isn't actually a bug. However, we should still allow contrib to add language handling, so this is still a valid patch. Recategorizing as a task.

xjm’s picture

So based on #11, let's additionally add some inline comments to the patch that clarify that the langcode support is provided for other modules and that core does not include language handling for taxonomy entities.

ZenDoodles’s picture

Assigned: Unassigned » ZenDoodles
Status: Needs review » Needs work

Nabbed for Zgear!

Zgear’s picture

Assigned: ZenDoodles » Zgear
xjm’s picture

Assigned: Zgear » Unassigned
k_zoltan’s picture

Version: 8.x-dev » 7.x-dev

#1499596: Introduce a basic entity form controller this issue resolved (took out) the bug from the drupal 8 core but need backport to drupal 7.

k_zoltan’s picture

Status: Needs work » Needs review

#1495648: Introduce entity language support this issue resolved the bug for the Drupal 7 core

k_zoltan’s picture

Status: Needs review » Fixed

checked for Drupal 8 & 7 (see above) fixedin both by other issues => marking it as fixed

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