diff --git a/application/models/TemplateConfiguration.php b/application/models/TemplateConfiguration.php index 0b7a242187d..b2fc26a466c 100644 --- a/application/models/TemplateConfiguration.php +++ b/application/models/TemplateConfiguration.php @@ -578,11 +578,17 @@ protected function getFrameworkAssetsReplacement( $sType ) public function getParentConfiguration(){ - //check for surveygroup id - if($this->sid != null && $this->gsid != null) - return Template::getTemplateConfiguration(null,null,$this->gsid); - //check for general global template - return Template::getTemplateConfiguration($this->templates_name); + if (empty($this->oParentTemplate)){ + //check for surveygroup id + if($this->sid != null && $this->gsid != null){ + $this->oParentTemplate = Template::getTemplateConfiguration(null,null,$this->gsid); + }else{ + //check for general global template + $this->oParentTemplate = Template::getTemplateConfiguration($this->templates_name); + } + } + return $this->oParentTemplate; + } public function getFieldFromParentConfiguration($sField){