Skip to content

Commit

Permalink
Fix incorrect redirect URL after workflow actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Aug 16, 2019
1 parent 38a5fb6 commit e547b83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/elements/Submission.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getCpEditUrl()
$url = $owner->getCpEditUrl();

if ($this->ownerDraftId) {
$url .= '&draftId=' . $this->ownerDraftId;
$url = UrlHelper::cpUrl($url, ['draftId' => $this->ownerDraftId]);
}

return $url;
Expand Down
2 changes: 1 addition & 1 deletion src/services/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function onAfterSaveEntry(ModelEvent $event)
$url = $event->sender->getCpEditUrl();

if ($event->sender->draftId) {
$url .= '&draftId=' . $event->sender->draftId;
$url = UrlHelper::cpUrl($url, ['draftId' => $event->sender->draftId]);
}

$this->redirect($url);
Expand Down

0 comments on commit e547b83

Please sign in to comment.