From b8886a8d83ffda7f5275e704c85803b5a99026c6 Mon Sep 17 00:00:00 2001 From: Bozhidar Hristov Date: Thu, 22 Dec 2016 17:46:17 +0200 Subject: [PATCH] Fix when not entering all translations --- src/Form/EventListener/TranslationsListener.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Form/EventListener/TranslationsListener.php b/src/Form/EventListener/TranslationsListener.php index fea2c55..17a61d0 100644 --- a/src/Form/EventListener/TranslationsListener.php +++ b/src/Form/EventListener/TranslationsListener.php @@ -86,6 +86,7 @@ public function submit(FormEvent $event) // Remove useless Translation object if (!$translation) { $Translatable->getTranslations()->removeElement($translation); + unset($data[$locale]); } else { $LanguageField = $this->TranslationService->getLanguageField(get_class($translation)); $TranslatableField = $this->TranslationService->getTranslatableField(get_class($translation));