diff --git a/code/controller/TranslatableCMSMainExtension.php b/code/controller/TranslatableCMSMainExtension.php index 18e78d9..5cd0897 100644 --- a/code/controller/TranslatableCMSMainExtension.php +++ b/code/controller/TranslatableCMSMainExtension.php @@ -81,8 +81,8 @@ class TranslatableCMSMainExtension extends Extension { } function updateEditForm(&$form) { - $siteConfig = SiteConfig::current_site_config(); if($form->getName() == 'RootForm' && Object::has_extension('SiteConfig',"Translatable")) { + $siteConfig = SiteConfig::current_site_config(); $form->Fields()->push(new HiddenField('Locale','', $siteConfig->Locale)); } }