From 6d7700f8f6bbfd9ebcc34cdf2ba44c5229561ca1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 14 Aug 2012 11:22:42 +0200 Subject: [PATCH] BUG Fix admin/myprofile saving Ignore the extension's init() method being called on LeftAndMain base class, which is the case when requests are first routed through AdminRootController as an intermediary rather than the endpoint controller --- code/controller/TranslatableCMSMainExtension.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/controller/TranslatableCMSMainExtension.php b/code/controller/TranslatableCMSMainExtension.php index 838cf1a..e7849b3 100644 --- a/code/controller/TranslatableCMSMainExtension.php +++ b/code/controller/TranslatableCMSMainExtension.php @@ -9,6 +9,11 @@ class TranslatableCMSMainExtension extends Extension { ); function init() { + // Ignore being called on LeftAndMain base class, + // which is the case when requests are first routed through AdminRootController + // as an intermediary rather than the endpoint controller + if(!$this->owner->stat('tree_class')) return; + // Locale" attribute is either explicitly added by LeftAndMain Javascript logic, // or implied on a translated record (see {@link Translatable->updateCMSFields()}). // $Lang serves as a "context" which can be inspected by Translatable - hence it