For a project I used the i18n and entity_translation module in combination. Therefore I created a content type with i18n translation and one with entity_translation. On both I added the same paragraphs field and selected for the one with entity translation that it should be translatable. After adding some language neutral content to the content type with i18n translation, I wanted to switch the language of this content. When I did this, I recognized that the added paragraph items disappear.
Steps to reproduce:
- Install a fresh drupal version
- Install i18n (with i18n_node), entity_translation and paragraphs
- Configure the site as multisite with at least 2 languages
- Create a paragraphs bundle with a long text field
- Configure the Basic page content type with multilingual support (Enabled, with translation) and add a paragraphs field to it
- Configure the Article content type with multilingual support (Enabled, with field translation) and add the same paragraphs field as in the page content type to it and choose that this field supports Field translation
- Create a language neutral Basic page with a paragraph with some text and save it
- You will see the content with the paragraph
- Edit the same content and change the language
- You will see, that the paragraph element disappears
As a solution for this problem I thought that I just can use a new non translated field, but I also think that this is an unexpected problem and should be solved.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2882658-10-1.patch | 675 bytes | ianwensink |
|
Comments
Comment #2
howdytom CreditAttribution: howdytom as a volunteer commentedyes, I am able to reproduce this as well. Did you find a workaround?
Comment #3
schwarli4783 CreditAttribution: schwarli4783 commentedUnfortunately not. The only solution for me at the moment is to create a new non translated field and use this field instead.
Comment #4
sonneworks CreditAttribution: sonneworks commentedI noticed that in this file: paragraphs.field_formatter.inc the call to view() does not have a language set
shouldn't this be
that seems to solve it for me
Comment #5
howdytom CreditAttribution: howdytom as a volunteer commentedComment #6
ciss CreditAttribution: ciss at yousign GmbH commentedThere's no patch to review.
Comment #7
sonneworks CreditAttribution: sonneworks commentedComment #8
sonneworks CreditAttribution: sonneworks commentedComment #9
ciss CreditAttribution: ciss at yousign GmbH commented@sonneworks please follow https://www.drupal.org/node/707484 to create a patch that can be applied and tested. I'm guessing the patch can't be applied by the testbot because the "diff --git ..." and "index ..." lines are missing.
Comment #10
ianwensink CreditAttribution: ianwensink as a volunteer commentedHave the same problem. Took #7 and made it into an actual patch, so now it can be applied.
Comment #11
heliogabalthere is actually another more complete patch available that does the same thing at this related issue:
https://www.drupal.org/project/paragraphs/issues/2645646
I think this should get closed as duplicate therefore. Feel free to reopen if the other patch doesn't resolve this issue as well - it will definitely solve it better than the patch within this issue.