Index: branches/5.1.x/core/units/themes/themes_eh.php =================================================================== diff -u -N -r13086 -r13168 --- branches/5.1.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 13086) +++ branches/5.1.x/core/units/themes/themes_eh.php (.../themes_eh.php) (revision 13168) @@ -1,6 +1,6 @@ Array('self' => true), 'OnChangeTheme' => Array('self' => true), ); $this->permMapping = array_merge($this->permMapping, $permissions); } /** + * Permission check override + * + * @param kEvent $event + */ + function CheckPermission(&$event) + { + if ($event->Name == 'OnItemBuild') { + // check permission without using $event->getSection(), + // so first cache rebuild won't lead to "ldefault_Name" field being used + return true; + } + + return parent::CheckPermission($event); + } + + /** * Allows to set selected theme as primary * * @param kEvent $event