View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
12794Bug reportsTheme editorpublic2017-10-25 11:18
Reportertammo Assigned Toollehar  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.0.0-beta.x 
Fixed in Version3.0.0-rc.x 
Summary12794: Crash when using copy_of_minimal (template editor)
Description
  1. new installation from GIT with 1 default survey (attached)
  2. in template editor copy "minimal" to "copy_of_minimal"
  3. Activate "copy_of_minimal" on default survey
  4. Preview default survey
  5. Observe crash
Additional Information

User error

TEMPLATE ERROR!

D:\dev\lsgit\application\core\LSETwigViewRenderer.php(159)

147 {
148 $oRTemplate = Template::model()->getInstance();
149 $oTemplate = $this->getTemplateForView($sView, $oRTemplate);
150 if ($oTemplate) {
151 $line = file_get_contents($oTemplate->viewPath.$sView);
152 $result = $this->renderTemplateFromString($line, $aDatas, $oRTemplate, $bReturn);
153
154 if ($bReturn) {
155 Yii::app()->clientScript->registerPackage($oRTemplate->sPackageName);
156 return $result;
157 }
158 } else {
159 trigger_error("TEMPLATE ERROR!", E_USER_ERROR);
160 }
161
162 return null;
163 }
164
165 public function renderOptionPage($oTemplate,$renderArray = array())
166 {
167 $oRTemplate = $oTemplate;
168
169 $sOptionFile = '/options/options.twig';
170 $sOptionJS = '/options/options.js';
171
Stack Trace
#0
– D:\dev\lsgit\application\core\LSETwigViewRenderer.php(159): trigger_error("TEMPLATE ERROR!", 256)
154 if ($bReturn) {
155 Yii::app()->clientScript->registerPackage($oRTemplate->sPackageName);
156 return $result;
157 }
158 } else {
159 trigger_error("TEMPLATE ERROR!", E_USER_ERROR);
160 }
161
162 return null;
163 }
164
#1
– D:\dev\lsgit\application\helpers\frontend_helper.php(2110): LSETwigViewRenderer->renderTemplateFromFile("layout_first_page.twig", array("oSurvey" => Survey, "aSurveyInfo" => array("htmlemail" => "Y", "format" => "G", "template" => "copy_of_minimal", "language" => "en", ...)), false)
2105 $thissurvey['attr']['welcomecontainer'] = $thissurvey['attr']['surveyname'] = $thissurvey['attr']['description'] = $thissurvey['attr']['welcome'] = $thissurvey['attr']['questioncount'] = '';
2106
2107
2108
2109
2110 Yii::app()->twigRenderer->renderTemplateFromFile("layout_first_page.twig", array('oSurvey'=>Survey::model()->findByPk($surveyid), 'aSurveyInfo'=>$thissurvey), false);
2111 }
2112
2113 /
2114 killSurveySession : reset $_SESSION part for the survey
2115
@param int $iSurveyID
#2
– D:\dev\lsgit\application\helpers\SurveyRuntimeHelper.php(917): display_first_page(array("htmlemail" => "Y", "format" => "G", "template" => "copy_of_minimal", "language" => "en", ...), array("htmlemail" => "Y", "format" => "G", "template" => "copy_of_minimal", "language" => "en", ...))
912 // Previously we used to keep the session and redirect the user to the
913 // submit page.
914 if ($this->sSurveyMode != 'survey' && $_SESSION[$this->LEMsessid]['step'] == 0){
915 $_SESSION[$this->LEMsessid]['test']=time();
916
917 display_first_page($this->thissurvey, $this->aSurveyInfo);
918 Yii::app()->end(); // So we can still see debug messages
919 }
920 }
921
922 /

#3
– D:\dev\lsgit\application\helpers\SurveyRuntimeHelper.php(105): SurveyRuntimeHelper->displayFirstPageIfNeeded()
100 }
101
102 if ( !$this->previewgrp && !$this->previewquestion){
103 $this->initMove(); // main methods to init session, LEM, moves, errors, etc
104 $this->checkQuotas(); // check quotas (then the process will stop here)
105 $this->displayFirstPageIfNeeded();
106 $this->saveAllIfNeeded();
107 $this->saveSubmitIfNeeded();
108
109 // TODO: move somewhere else
110 $this->setNotAnsweredAndNotValidated();
#4
– D:\dev\lsgit\application\controllers\survey\index.php(586): SurveyRuntimeHelper->run("674294", array("surveyid" => "674294", "thissurvey" => array("htmlemail" => "Y", "format" => "G", "template" => "copy_of_minimal", "language" => "en", ...), "thisstep" => null, "tokensexist" => 0, ...))
581 //Send local variables to the appropriate survey type
582 unset($redata);
583 $redata = compact(array_keys(get_defined_vars()));
584 Yii::import('application.helpers.SurveyRuntimeHelper');
585 $tmp = new SurveyRuntimeHelper();
586 $tmp->run($surveyid,$redata);
587
588 if (App()->request->getPost('saveall') || isset($flashmessage)){
589 App()->clientScript->registerScript("saveflashmessage","alert('".gT("Your responses were successfully saved.","js")."');",CClientScript::POS_READY);
590 }
591 }
#5
– D:\dev\lsgit\application\controllers\survey\index.php(21): index->action()
16 public $oTemplate;
17
18 public function run()
19 {
20 useFirebug();
21 $this->action();
22 }
23
24 function action()
25 {
26 global $surveyid;
#6
– D:\dev\lsgit\framework\web\actions\CAction.php(76): index->run()
71 {
72 $method=new ReflectionMethod($this, 'run');
73 if($method->getNumberOfParameters()>0)
74 return $this->runWithParamsInternal($this, $method, $params);
75
76 $this->run();
77 return true;
78 }
79
80 /*
81
Executes a method of an object with the supplied named parameters.
#7
– D:\dev\lsgit\framework\web\CController.php(308): CAction->runWithParams(array("lang" => "en", "sid" => "674294"))
303 {
304 $priorAction=$this->_action;
305 $this->_action=$action;
306 if($this->beforeAction($action))
307 {
308 if($action->runWithParams($this->getActionParams())===false)
309 $this->invalidActionParams($action);
310 else
311 $this->afterAction($action);
312 }
313 $this->_action=$priorAction;
#8
– D:\dev\lsgit\framework\web\CController.php(286): CController->runAction(index)
281 @see runAction
282
/
283 public function runActionWithFilters($action,$filters)
284 {
285 if(empty($filters))
286 $this->runAction($action);
287 else
288 {
289 $priorAction=$this->_action;
290 $this->_action=$action;
291 CFilterChain::create($this,$action,$filters)->run();
#9
– D:\dev\lsgit\framework\web\CController.php(265): CController->runActionWithFilters(index, array())
260 {
261 if(($parent=$this->getModule())===null)
262 $parent=Yii::app();
263 if($parent->beforeControllerAction($this,$action))
264 {
265 $this->runActionWithFilters($action,$this->filters());
266 $parent->afterControllerAction($this,$action);
267 }
268 }
269 else
270 $this->missingAction($actionID);
#10
– D:\dev\lsgit\framework\web\CWebApplication.php(282): CController->run("index")
277 {
278 list($controller,$actionID)=$ca;
279 $oldController=$this->_controller;
280 $this->_controller=$controller;
281 $controller->init();
282 $controller->run($actionID);
283 $this->_controller=$oldController;
284 }
285 else
286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
287 array('{route}'=>$route===''?$this->defaultController:$route)));
#11
– D:\dev\lsgit\framework\web\CWebApplication.php(141): CWebApplication->runController("survey/index/sid/674294")
136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
137 $_GET[$name]=$value;
138 }
139 else
140 $route=$this->getUrlManager()->parseUrl($this->getRequest());
141 $this->runController($route);
142 }
143
144 /
145 Registers the core application components.
146
This method overrides the parent implementation by registering additional core components.
#12
– D:\dev\lsgit\framework\base\CApplication.php(185): CWebApplication->processRequest()
180 public function run()
181 {
182 if($this->hasEventHandler('onBeginRequest'))
183 $this->onBeginRequest(new CEvent($this));
184 register_shutdown_function(array($this,'end'),0,false);
185 $this->processRequest();
186 if($this->hasEventHandler('onEndRequest'))
187 $this->onEndRequest(new CEvent($this));
188 }
189
190 /

#13
– D:\dev\lsgit\index.php(195): CApplication->run()
190 require_once APPPATH . 'core/LSYii_Application' . EXT;
191
192 $config = require_once(APPPATH . 'config/internal' . EXT);
193
194 Yii::$enableIncludePath = false;
195 Yii::createApplication('LSYii_Application', $config)->run();
196
197 / End of file index.php /
198 / Location: ./index.php /
2017-10-15 10:08:32 Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30 Yii Framework/1.1.18

TagsNo tags attached.
Attached Files
defaultsurvey.lss (12,544 bytes)
Bug heat2
Complete LimeSurvey version number (& build)3.0 GIT
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionbb
Server OS (if known)bb
Webserver software & version (if known)bb
PHP Version5.5.30

Users monitoring this issue

There are no users monitoring this issue.

Activities

tammo

tammo

2017-10-19 11:27

developer   ~44734

OK now.

Issue History

Date Modified Username Field Change
2017-10-15 10:14 tammo New Issue
2017-10-15 10:14 tammo Status new => assigned
2017-10-15 10:14 tammo Assigned To => ollehar
2017-10-15 10:14 tammo File Added: defaultsurvey.lss
2017-10-19 11:27 tammo Status assigned => resolved
2017-10-19 11:27 tammo Resolution open => fixed
2017-10-19 11:27 tammo Note Added: 44734
2017-10-25 11:16 c_schmitz Fixed in Version => 3.0.0-rc.x
2017-10-25 11:18 c_schmitz Status resolved => closed