From 4f433155f1ae811f442ded7b03f207986fad720f Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 13 Aug 2012 10:06:12 +0200 Subject: [PATCH] BUG Check for extensions on record in CMS (fixes #41) --- code/controller/TranslatableCMSMainExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controller/TranslatableCMSMainExtension.php b/code/controller/TranslatableCMSMainExtension.php index 21b39b4..838cf1a 100644 --- a/code/controller/TranslatableCMSMainExtension.php +++ b/code/controller/TranslatableCMSMainExtension.php @@ -30,7 +30,7 @@ class TranslatableCMSMainExtension extends Extension { // if a locale is set, it needs to match to the current record $requestLocale = $req->requestVar("Locale") ? $req->requestVar("Locale") : $req->requestVar("locale"); $page = $this->owner->currentPage(); - if($requestLocale && $page && $page->Locale != $requestLocale) { + if($requestLocale && $page && $page->hasExtension('Translatable') && $page->Locale != $requestLocale) { $transPage = $page->getTranslation($requestLocale); if($transPage) { Translatable::set_current_locale($transPage->Locale);