It seems that currently Edit is unaware of Entity Translations, with every Quick Edit action saving changes to an original field value only.
Steps to reproduce:
* Enable Entity Translations module
* Enable 2 or more languages
* Enable entity translations (field-based) for a target content type & enable translations on a specific field (for example, 'field_body')
* Fill in both the original content & translation version with any data from back-end
* Preview the content from front-end and ensure that original & translations are displayed correctly by switching languages back & forth (for example, by using 'Switch Language' block)
* Switch to any language different than original one and perform Quick Edit action on content
* Change anything on target field & save
* Preview the content once again by switching languages -- Quick Edit update will overwrite the original field value (not the translated one)
Comment | File | Size | Author |
---|---|---|---|
#7 | edit-et-compatiblity-2237403-7.patch | 826 bytes | Shuairan |
#2 | edit-et-compatiblity-2237403-2.patch | 603 bytes | Shuairan |
Comments
Comment #1
capnut CreditAttribution: capnut commentedComment #2
Shuairan CreditAttribution: Shuairan commentedWe struggled with the same issue...
Entity Translation loads the formLanguage from the entity handler in entity_translation_field_attach_form.
This seems to be not set by any module, so the function will always return the original language.
The appended patch changes the edit module to set the formLanguage to $langcode before field_attach_form is called, dont know if it breaks any other module or functions, we are testing this currently at our setup.
Feel free to test and report!
Comment #3
Wim LeersAssigning to Gábor for review.
Comment #5
Wim LeersAnd of course, this patch will need to pass tests first.
Comment #6
Gábor HojtsyYou would certainly not call out to entity translation like this. This line of code would definitely not work on sites where the module is not even enabled. Look into either implementing this from the entity_translation side or using module_invoke() here.
Comment #7
Shuairan CreditAttribution: Shuairan commentedokay, thanks for the hint :)
I totally missed that this is a entity_translation specific function... here is a new patch
Comment #8
capnut CreditAttribution: capnut commentedThe patch works indeed.
And not only title/body text fields but through the entity reference fields as well.
That's great!
Comment #9
Shuairan CreditAttribution: Shuairan commentedstatus back to Needs review, I think this very small patch is mandatory for Drupal7 with edit module and entity_translation.
Comment #10
Shuairan CreditAttribution: Shuairan commentedOkay, seems to be still not fully fixed:
The entry in the entity_translation table will never be created.
And the "changed" value will not be updated if the translation is changed via edit module.
Comment #11
Wim LeersNW per #10.
I'd also like to see test coverage. If that's not feasible, I want thorough manual testing reports.