Browse files

BUG: redirect to pages overview not working from page edit view

The redirect to pages overview was not working because the pages overview and page edit views
share the same session namespace, and therefore the checks to see if we need to redirect to
pages overview (i.e. if there is a translated record for the current page) matched also for
the redirected request.

Fixed by checking if we already are on the CMSPagesController before redirecting to it.
  • Loading branch information...
1 parent c3c9f1f commit 451576f36df998ca2909861bbe055bcf4d7722cc @forsdahl forsdahl committed Sep 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/controller/TranslatableCMSMainExtension.php
@@ -44,7 +44,7 @@ function init() {
// ?locale will automatically be added
- } else {
+ } else if ($this->owner->class != 'CMSPagesController') {
// If the record is not translated, redirect to pages overview
return $this->owner->redirect(Controller::join_links(

0 comments on commit 451576f

Please sign in to comment.