Skip to content

Commit

Permalink
BUG: redirect to pages overview not working from page edit view
Browse files Browse the repository at this point in the history
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
forsdahl committed Sep 3, 2012
1 parent c3c9f1f commit 451576f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/controller/TranslatableCMSMainExtension.php
Expand Up @@ -44,7 +44,7 @@ function init() {
$transPage->ID
// ?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(
singleton('CMSPagesController')->Link(),
Expand Down

0 comments on commit 451576f

Please sign in to comment.