mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-06 07:46:50 +02:00
Fix for page not redirecting when changing folder name - #67 (requires grav update)
This commit is contained in:
@@ -158,7 +158,6 @@ class Admin
|
||||
|
||||
$this->setMessage($l->translate('LOGIN_LOGGED_IN'), 'info');
|
||||
|
||||
// $redirect_route =$this->getLoginRedirect() ?: $this->uri->route();
|
||||
$redirect_route = $this->uri->route();
|
||||
$grav->redirect($redirect_route);
|
||||
}
|
||||
|
||||
@@ -882,8 +882,8 @@ class AdminController
|
||||
|
||||
// Always redirect if a page route was changed, to refresh it
|
||||
if ($obj instanceof Page\Page) {
|
||||
if (method_exists($obj, 'unsetRoute')) {
|
||||
$obj->unsetRoute();
|
||||
if (method_exists($obj, 'unsetRouteSlug')) {
|
||||
$obj->unsetRouteSlug();
|
||||
}
|
||||
$this->setRedirect($this->view . $obj->route());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user