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.
I wasn't able to enable any language when creating new content with entity translation.
When activating "Exclude Language neutral from the available languages" it gave an 'illegal choice' errorwhen saving a node.
After turning of the i18n multilingual content module everything seems to be o.k.
Comment | File | Size | Author |
---|---|---|---|
#26 | i18n_1852102-23_incompatibility_with_entity_translation.patch | 999 bytes | srclarkx |
Comments
Comment #1
plachET and multilingual content are incompatible, we should make this clear.
Comment #2
plachComment #3
plachRelated issue: #1669494: Selecting language in new node and saving, keeps node language neutral.
Comment #4
my-family CreditAttribution: my-family commentedI can confirm this. Enabling this modules together >> the user is unable to save any node.
Comment #5
my-family CreditAttribution: my-family commented>> critical
Comment #6
plachWhat about providing some documentation instead of arbitrarily raising the priority? I'm afraid this won't change the importance this issue has to my eyes :)
Comment #7
my-family CreditAttribution: my-family commented#6: Sorry, probably I don't get your message. I think i simply used the comment form possibilities, is it wrong? I forgot to change the priority, so I made it in the next step. I will help you with documentation if needed, of course. However, I did not know that I can contribute to the documentation of certain module if I don't maintain the module. Tell me please how can I help.
Comment #8
plachThe documentation pages should be editable by any logged user, I'd probably add some notes about this here: http://drupal.org/node/1280800.
Comment #9
drzraf CreditAttribution: drzraf commentedYou mean incompatible per content-type isn't ?
Using i18n for a very variable content-type and ET for another, more homogeneous, one is still possible. Am I wrong ?
Comment #10
plachNode translation and field translation for nodes are compatible. The Multilingual content submodule may filter node listings (and menu items) by node language, depending on its settings. This usually causes troubles to ET, but it depends on your use case.
Comment #11
plachComment #12
marktheshark CreditAttribution: marktheshark commentedProblem is that multilingual content allows e.g. hiding the content translation links (which can be hidden from the content type itself though).
I'd also like to note that I have a views block in a panel on my front page that doesn't select the correct language. The page view on the other hand does...
I have both multilingual select and multilingual content disabled.
Comment #13
plachI'm sorry but ET and Multilingual content are architecturally incompatible. There's nothing to do here. However also ET lets you hide the content translation links in the latest versions.
Comment #14
marktheshark CreditAttribution: marktheshark commentedThanks, I just edited my note above about the setting per content type.
Could you take a look at this front page?
The view slide show block in the front page panel shows 2 latest news items in the default language and the 3rd is in the non-default language, for no good reason...
Whereas on the News page (accessible from menu), the language selection is better.
Any ideas?
Comment #15
plachPlease, let's not derail this issue. If you are having troubles and they are not related to multilingual content let's repopen the issue we came from and clarify what's wrong and how to reproduce it.
Comment #16
marktheshark CreditAttribution: marktheshark commentedOK, will post in more appropriate thread.
Comment #17
plachSorry, guys, actually the incompatibility is with the Multilingual select module. See #2107219: How to translate content type names? for details.
Comment #18
kitikonti CreditAttribution: kitikonti commentedNo i have to disagree, i have enabled the Multiligual content (i18n_node) module and Multilingual select (i18n_select) is disabled. I just need the Multilingual content module to translate my content type.
With this configuration i get exactly the same error described in the issue summary:
So what is the solution for this Problem? In my opinion this are two necessary features to create a multilingual site. So currently it is not possible to create a multilingual site with d7 and entity translation, or am i wrong?
Comment #19
baso CreditAttribution: baso commentedSee #18 in https://www.drupal.org/node/1669494 for a possible workaround.
Comment #20
gagarine CreditAttribution: gagarine commentedThis is something than don't let you adding content. Major.
Comment #21
gagarine CreditAttribution: gagarine commentedThe problem is with i18n_node not i18n_select
Comment #22
markus_petrux CreditAttribution: markus_petrux commentedWe have seen this problem when a particular content type in Entity Translation is configured to "Exclude Language neutral from the available languages", but the Content Translation (i18n_node) option "Default language for content types with Multilingual support disabled" is configured as " Language neutral (Recommended)".
i18n_node should not apply that setting when the content type is configured with Multilingual support enabled, with entity translation. This code in i18n_node.module:
The elseif part should not be done when translations are managed by Entity Translation.
It looks like that's a bug in i18n_node module?
Comment #23
Cyclodex CreditAttribution: Cyclodex commentedI also debugged the state of language in the form. And of course it seems that ii18n is overriding the language field and sets UND as language which then makes validation fail for entity_translation.
I could solve my issues with adding an other check to i18n_node.module in _i18n_node_form_node_form_alter()
With entity_translation the IF statement will report "4" (ENTITY_TRANSLATION_ENABLED) and therefore not make the language override.
The question is, if entity_translation should change the language field after i18n_node or if the behaviour of i18n_node is wrong. For me it looks like they should not do the change if there is "any" language enabled. What they check does not take into account that there can be content types with translation mode = 4 (ENTITY_TRANSLATION_ENABLED)
Comment #24
lmeurs CreditAttribution: lmeurs commented#22 + #23: See #1662884: i18n_node_type_enabled is incompatible with Entity Translation (field translation) type.
Comment #25
rv0 CreditAttribution: rv0 commented@Cyclodex
Thanks for that fix!
@lmeurs, @Cyclodex
Re-opened the linked issue.. You should considering posting your change there as a patch.
Comment #26
srclarkx CreditAttribution: srclarkx as a volunteer commentedSince I have to add this as a patch, I've included a patch. It may not follow the current patch conventions, but it follows the conventions for our site.
Comment #27
srclarkx CreditAttribution: srclarkx as a volunteer commentedThe patch is actually not to the entity translation module. I think I'll put the patch in https://www.drupal.org/node/1662884
Comment #28
stefanos.petrakis@gmail.comThis problem has been resolved with the patch submitted in #1662884: i18n_node_type_enabled is incompatible with Entity Translation (field translation) type, which means that i18n_node > 1.14 is what is needed to avoid it.
For reference:
As described in #1852102-22: Clarify that Multilingual Content (i18n_node) and ET are not compatible (thanks a lot @markus_petrux),
you need a version of i18n 1.14 (or earlier) and the following configuration:
Once Drupal is configured like this, try to add a node for a content type that has "Multilingual support" > Enabled, with field translation. You should get the error "An illegal choice has been detected. Please contact the site administrator." at that point.