- Merge request !115Issue #3330003: Experimental "Layout Paragraphs Builder" field widget overwrites original language when saving translation β (Open) created by justin2pin
- First commit to issue fork.
- πΊπ¦Ukraine sickness29
Added test for front end builder which checks translations management, found also issues with symmetric translation setup, so added fixes as well, please check and let me know if anything
- First commit to issue fork.
- π³π±Netherlands falco010 π³π± The Netherlands
Hi @sickness29
We were getting the following errors after your last commit:
InvalidArgumentException: Invalid translation language (it) specified. in Drupal\Core\Entity\ContentEntityBase->getTranslation() (line 903 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
Drupal\layout_paragraphs\LayoutParagraphsLayout->getEntities() (Line: 275)
Drupal\layout_paragraphs\LayoutParagraphsLayout->getComponents() (Line: 246)
Drupal\layout_paragraphs\LayoutParagraphsLayout->getLayoutSection(Object) (Line: 74)
Drupal\layout_paragraphs\LayoutParagraphsRendererService->renderLayoutSection(Array, Object, 'default') (Line: 273)
Drupal\layout_paragraphs\Plugin\paragraphs\Behavior\LayoutParagraphsBehavior->view(Array, Object, Object, 'default') (Line: 42)So I added a guard for the getTranslation() you added to prevent this error from happening. Whenever a getTranslation() is called it should always be checked if the translations exists by doing a hasTranslation() to prevent the above error.
- Status changed to Needs review
2 months ago 12:57pm 8 July 2025 - π³π±Netherlands Drumanuel
I experience this exact issue: if the paragraphs on the secondary language are edited in the front end editor (Experimental Layout Paragraphs Builder), all paragraphs on the original language are gone and overridden by the paragraphs on the secondary language.
I'm using 2.1, and seen this issue in 2.2. Is there any fix for these versions?
- π³π±Netherlands Drumanuel
Created a quick and dirty patch for 2.2.x (installed dev-2.2.x c97badf) based on the changes in https://git.drupalcode.org/project/layout_paragraphs/-/merge_requests/11...
Seems to work for me.
- π³π±Netherlands Drumanuel
Added a patch for 2.1 as 2.2 has a bug where dragging sub items is not working (not sure how to reproduce it however).