- 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.