diff --git a/code/CMSMain.php b/code/CMSMain.php index 1f1e1c65..74504c0d 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -275,7 +275,7 @@ JS; } // Don't open a page from a different locale - if($record && Translatable::is_enabled() && $record->Locale && $record->Locale != Translatable::get_current_locale()) { + if($record && Object::has_extension('SiteTree', 'Translatable') && $record->Locale && $record->Locale != Translatable::get_current_locale()) { $record = null; } diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index be697ead..f86c266c 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -119,7 +119,7 @@ class LeftAndMain extends Controller { ); // set reading lang - if(Translatable::is_enabled() && !Director::is_ajax()) { + if(Object::has_extension('SiteTree', 'Translatable') && !Director::is_ajax()) { Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree'))); }