Exception

Template needs either template name or survey id

/var/www/joomla/www/application/models/TemplateConfiguration.php(60)

48      * If it's a user template, it will check if it's an old 2.0x template to provide default configuration values corresponding to the old template system
49      * If it's not an old template, it will check if it has a configuration file to load its datas.
50      * If it's not the case (template probably doesn't exist), it will load the default template configuration
51      * TODO : more tests should be done, with a call to private function _is_valid_template(), testing not only if it has a config.xml, but also id this file is correct, if it has the needed pstpl files, if the files refered in css exist, etc.
52      *
53      * @param string $sTemplateName     the name of the template to load. The string come from the template selector in survey settings
54      * @param integer $iSurveyId        the id of the survey. If
55      */
56     public function setTemplateConfiguration($sTemplateName='', $iSurveyId='')
57     {
58         if ($sTemplateName == '' && $iSurveyId == '')
59         {
60             throw new Exception("Template needs either template name or survey id");
61         }
62 
63         $this->sTemplateName = $sTemplateName;
64         $this->iSurveyId = $iSurveyId;
65 
66         if ($sTemplateName=='')
67         {
68             $this->oSurvey = Survey::model()->findByPk($iSurveyId);
69             $this->sTemplateName = $this->oSurvey->template;
70         }
71 
72         $this->isStandard = $this->setIsStandard();

Stack Trace

#0
+
 /var/www/joomla/www/application/controllers/SurveysController.php(30): TemplateConfiguration->setTemplateConfiguration("", null)
25             // using a "getInstance" method without parsing the template model from the controllers
26             // to the helpers/libraries/view will not resolve magically the problem. It will just create
27             // second instance.
28             global $oTemplate;            
29             $oTemplate = new TemplateConfiguration;
30             $oTemplate->setTemplateConfiguration('',$surveyid);
31 
32             if($oTemplate->cssFramework == 'bootstrap')
33             {
34                 App()->bootstrap->register();
35             }
#10
+
 /var/www/joomla/www/index.php(211): CApplication->run()
206         die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath));
207     }
208 }
209 
210 Yii::$enableIncludePath = false;
211 Yii::createApplication('LSYii_Application', $config)->run();
212 
213 /* End of file index.php */
214 /* Location: ./index.php */
2016-03-09 11:06:09 Apache/2.4.16 (Unix) OpenSSL/1.0.1s PHP/5.6.19 Yii Framework/1.1.17