Skip to content

Commit

Permalink
Bind form widget to controller when duplicating page.
Browse files Browse the repository at this point in the history
This fixes the modified page counter not working when updating a duplicated page, because the hidden inputs were not in the expected location.
  • Loading branch information
ericp-mrel committed Jun 16, 2024
1 parent 728d2f0 commit 4a6919a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a6919a

Please sign in to comment.