From d7dcfd7cd9315856425c487eb8cf62a0c81500f2 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 8 Jun 2022 13:04:47 +0200 Subject: [PATCH] DashboardsController: Add requested params to the refresh url when reordering widgets --- application/controllers/DashboardsController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/DashboardsController.php b/application/controllers/DashboardsController.php index aa667b55f..6da4e5e78 100644 --- a/application/controllers/DashboardsController.php +++ b/application/controllers/DashboardsController.php @@ -376,14 +376,15 @@ class DashboardsController extends CompatController } } + $params = clone $this->params; if ($duplicatedError) { // Even though the drop action couldn't be performed successfully from our server, Sortable JS has // already dropped the draggable element though, so we need to redirect here to undo it. - $this->redirectNow(Dashboard::BASE_ROUTE . '/settings'); + $this->redirectNow(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')->setParams($params)); } $this->createTabs(); - $this->getTabs()->setRefreshUrl(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')); + $this->getTabs()->setRefreshUrl(Url::fromPath(Dashboard::BASE_ROUTE . '/settings')->setParams($params)); $this->dashboard->activate('dashboard_settings'); $this->sendMultipartUpdate(); }