From 84a6a5215d8fd5009f0fab3f00f7120927a62df4 Mon Sep 17 00:00:00 2001 From: Stefan Scheu Date: Wed, 13 Dec 2023 20:06:51 +0100 Subject: [PATCH] fix: fixed setting editables for target documents --- .../Controller/Admin/Document/DocumentControllerBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/AdminBundle/Controller/Admin/Document/DocumentControllerBase.php b/bundles/AdminBundle/Controller/Admin/Document/DocumentControllerBase.php index e41491eea3a..716a775345f 100644 --- a/bundles/AdminBundle/Controller/Admin/Document/DocumentControllerBase.php +++ b/bundles/AdminBundle/Controller/Admin/Document/DocumentControllerBase.php @@ -180,7 +180,7 @@ protected function addDataToDocument(Request $request, Model\Document $document) { if ($document instanceof Model\Document\PageSnippet) { // if a target group variant get's saved, we have to load all other editables first, otherwise they will get deleted - if ($request->get('appendEditables') || ($document instanceof TargetingDocumentInterface && $document->hasTargetGroupSpecificEditables())) { + if($request->get('appendEditables') || (interface_exists(TargetingDocumentInterface::class) && $document instanceof TargetingDocumentInterface)) { // ensure editable are loaded $document->getEditables(); } else {