Active
Project:
Entity Translation
Version:
7.x-1.x-dev
Component:
Base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Mar 2013 at 17:42 UTC
Updated:
23 Dec 2016 at 20:18 UTC
Jump to comment: Most recent
Comments
Comment #1
plachWith entity language do you mean the value returned by
entity_language()? If so when you enable ET that value will be the language of the translation you are editing when you are in an entiy form page, or the entity language in any other context.If you have node translation enabled for that content type,
entity_language()should always match the actual node language, at least this is the intended behavior.Comment #2
plachDidn't mean to change the status.
Comment #3
yannickooBut I edited a german node which has an english translation.
Comment #4
plachNode translation or field translation?
Comment #5
yannickooOnly content translation.
Comment #6
plachThen I'm afraid we have a bug, please see http://drupal.org/project/entity_translation#bugfixing.
Comment #7
plachComment #8
yannickooI'm already a module maintainer and I know that it is not easy to reproduce things but please tell me which variables I should show you (in entity_language() maybe) so that you can understand it.
Comment #9
plachWonderful :)
Well, if you could help me with some actual steps it would be better, so that I can use a debugger to see what's wrong. Anyway, the value returned by
entity_language()is determined by the value returned byEntityTranslationNodeHandler::getFormLanguage(). Hence you should see whereEntityTranslationNodeHandler::setFormLanguage()is called with the wrong language.Also, are you on the latest dev?
Comment #10
plach[duplicate comment]
Comment #11
yannickooWill try that later :)
Comment #12
fRd- commentedHello,
I am having exactly the same issue.
My website has 4 languages. For 3 languages I get the message "There is already a translation in this language." when editing or previewing a change on the pages.
For the fourth language I can make edits.
Can someone advise what to do?
I am running 7.x-1.2
Thanks!
Comment #13
nagy.balint commentedI have the same issue currently.
It seems that the $node->translations only contain the other translations and not the original language which is the english.
So when getTranslations works it only checks
if (!isset($this->entity->{$translations_key})) {
So that is false, and then it returns return $this->entity->{$translations_key};, and then it thinks that english does not exist and falls back to the other language.