I have website running in three different languages (EN,GB,DE). There is some issue with Single Content Export.
The Single Content Export only showing export configuration for content of EN website, although it lists all content when I type something in Content Entity text box. The moment I select any of the content from GB or DE site it stops updating export configuration tab and doesn’t show anything in it whether I am logged in as admin to EN site, GB site or DE site.
In my log I found
Initially when I first select the content of GB/DE site it throws
InvalidArgumentException: Invalid translation language (en) specified. in Drupal\Core\Entity\ContentEntityBase->getTranslation() (line 873 of /Applications/MAMP/htdocs/myproject/web/core/lib/Drupal/Core/Entity/ContentEntityBase.php).
And after first attempt it starts showing following error
Error: Call to a member function getTranslation() on null in Drupal\content_sync\Form\ContentSingleExportForm->updateExport() (line 177 of /Applications/MAMP/htdocs/myproject/web/modules/contrib/content_sync/src/Form/ContentSingleExportForm.php)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | unable-to-generate-content-configuration-for-multilingual-website-3193456-3.patch | 689 bytes | svetlio |
Comments
Comment #2
nicolas bouteille commentedI faced the same issue while testing the single item export.
This workaround allowed me to prevent the error from happening and see the generated YML content :
Comment #3
svetlio commentedPatch for #2. Thanks Nicolas.
Comment #4
blanca.esqueda commentedThank you for the catch!
Actually, the following lines are not necessary in the ContentSingleExportForm file:
At some point, I was deciding if managing translations inside the same entity YML or as separate YML files, so I left it there when testing different options.
Code updated and included to 3.0.x-dev
Comment #6
blanca.esqueda commented