From 4a6919a1c6e0ce9422883944eb9cd951b8f78288 Mon Sep 17 00:00:00 2001 From: Eric Pfeiffer Date: Sun, 16 Jun 2024 12:23:52 -0500 Subject: [PATCH] Bind form widget to controller when duplicating page. This fixes the modified page counter not working when updating a duplicated page, because the hidden inputs were not in the expected location. --- controllers/Index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/Index.php b/controllers/Index.php index 3b9d65d..c77f3a4 100644 --- a/controllers/Index.php +++ b/controllers/Index.php @@ -311,6 +311,8 @@ public function onDuplicateObject(): array $duplicatedObject = new $className($data); $widget = $this->makeObjectFormWidget($type, $duplicatedObject); + $widget->bindToController(); + $this->vars['objectPath'] = ''; $this->vars['canCommit'] = $this->canCommitObject($duplicatedObject); $this->vars['canReset'] = $this->canResetObject($duplicatedObject);