From eed067d6a380c541715b9798d2527662cf769278 Mon Sep 17 00:00:00 2001 From: Tony DeStefano Date: Thu, 25 Jul 2019 16:09:21 -0700 Subject: [PATCH] Set UID to null so new UID is generated on duplication. Closes #4653 for the 3.1 branch. --- src/services/Elements.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/Elements.php b/src/services/Elements.php index 2fb232e9ca3..00bdf1cd052 100644 --- a/src/services/Elements.php +++ b/src/services/Elements.php @@ -597,6 +597,7 @@ public function duplicateElement(ElementInterface $element, array $newAttributes $mainClone->setAttributes($newAttributes, false); $mainClone->duplicateOf = $element; $mainClone->id = null; + $mainClone->uid = null; $mainClone->contentId = null; // Make sure the element actually supports its own site ID