diff --git a/src/Admin/ActionListener/ContentVersion/TranslationsListener.php b/src/Admin/ActionListener/ContentVersion/TranslationsListener.php index db4bead..af5fdcd 100644 --- a/src/Admin/ActionListener/ContentVersion/TranslationsListener.php +++ b/src/Admin/ActionListener/ContentVersion/TranslationsListener.php @@ -10,7 +10,7 @@ use Softspring\CmsBundle\Manager\RouteManagerInterface; use Softspring\CmsBundle\Model\ContentInterface; use Softspring\CmsBundle\Model\ContentVersionInterface; -use Softspring\CmsBundle\Render\RenderErrorException; +use Softspring\CmsBundle\Render\Error\RenderErrorException; use Softspring\CmsBundle\Request\FlashNotifier; use Softspring\CmsBundle\Translator\TranslatableContext; use Softspring\CmsTranslationPlugin\SfsCmsTranslationPlugin; diff --git a/src/Translator/TranslatorExtractor.php b/src/Translator/TranslatorExtractor.php index 4e74421..b5406b7 100644 --- a/src/Translator/TranslatorExtractor.php +++ b/src/Translator/TranslatorExtractor.php @@ -89,7 +89,7 @@ public function extract(VersionInterface $version): array $seo = $version->getSeo(); foreach ($contentConfig as $field => $fieldConfig) { $extractedTranslations = $this->extractFieldTranslations($fieldConfig, $seo[$field] ?? null); - if (null !== $extractedTranslations) { + if ($extractedTranslations instanceof Translation) { $translations['_seo'][$field] = $extractedTranslations; } } @@ -151,7 +151,7 @@ protected function extractModule(array $moduleData): array continue; } $extractedTranslations = $this->extractFieldTranslations($fieldConfig, $moduleData[$field] ?? null); - if (null !== $extractedTranslations) { + if ($extractedTranslations instanceof Translation) { $translations[$field] = $extractedTranslations; } } diff --git a/templates/admin/content/version_translations.bootstrap5.html.twig b/templates/admin/content/version_translations.bootstrap5.html.twig index 7243392..434b641 100644 --- a/templates/admin/content/version_translations.bootstrap5.html.twig +++ b/templates/admin/content/version_translations.bootstrap5.html.twig @@ -16,23 +16,23 @@ href="{{ url('sfs_cms_admin_content_'~content_type~'_list') }}">{{ ('admin_'~content_type~'.list.breadcrumb')|trans }}