Skip to content

Commit

Permalink
IBX-4796: Removed referrerLocation from nodraft actions
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Feb 1, 2023
1 parent f49e3f5 commit 143a0d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/Form/Processor/ContentFormProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public function processPublish(FormActionEvent $event)
$event->setPayload('content', $content);
$event->setPayload('is_new', $draft->contentInfo->isDraft());

$locationId = $referrerLocation !== null ? $referrerLocation->id : $content->contentInfo->mainLocationId;
$locationId = $referrerLocation !== null && $data instanceof ContentUpdateData
? $referrerLocation->id
: $content->contentInfo->mainLocationId;

$redirectUrl = $form['redirectUrlAfterPublish']->getData() ?: $this->router->generate(
'_ez_content_view', [
Expand Down

0 comments on commit 143a0d0

Please # to comment.