diff --git a/code/extensions/SystemMessageControllerExtension.php b/code/extensions/SystemMessageControllerExtension.php index 93e8b33..bdd21eb 100644 --- a/code/extensions/SystemMessageControllerExtension.php +++ b/code/extensions/SystemMessageControllerExtension.php @@ -36,10 +36,10 @@ public function closesystemmessage() $message->close(); } - if ($action->exists) { - return $this->owner->redirect($action->BackURL); + if ($action) { + return $this->owner->redirect(Director::get_current_page()->Link()); } else { return $this->owner->redirectBack(); } } -} \ No newline at end of file +}