View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
12800Bug reportsTheme editorpublic2017-10-25 11:18
Reportertammo Assigned ToLouisGac 
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version3.0.0-beta.x 
Fixed in Version3.0.0-rc.x 
Summary12800: Crash when copy_of_vanilla
Description

Brand new installation of recent GIT develop
Copy vanilla template to copy_of_vanilla:

Internal Server Error

no template found for ./css/background-image.css!

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.

2017-10-17 19:03:35

Additional Information

Stack trace:

Exception

no template found for ./css/background-image.css!

D:\dev\lsgit\application\models\TemplateConfig.php(121)

109 Get the template for a given file. It checks if a file exist in the current template or in one of its mother templates
110

111 @param string $sFile the file to look for (must contain relative path, unless it's a view file)
112
@param TemplateConfig $oRTemplate template from which the recurrence should start
113 @return TemplateConfig
114
@throws Exception
115 */
116 public function getTemplateForFile($sFile, $oRTemplate)
117 {
118 while (!file_exists($oRTemplate->path.'/'.$sFile) && !file_exists($oRTemplate->viewPath.$sFile)){
119 $oMotherTemplate = $oRTemplate->oMotherTemplate;
120 if(!($oMotherTemplate instanceof TemplateConfiguration)){
121 throw new Exception("no template found for $sFile!");
122 break;
123 }
124 $oRTemplate = $oMotherTemplate;
125 }
126
127 return $oRTemplate;
128 }
129
130
131 /
132 Create a package for the asset manager.
133
The asset manager will push to tmp/assets/xyxyxy/ the whole template directory (with css, js, files, etc.)
Stack Trace
#0
– D:\dev\lsgit\application\views\admin\templates\templatesummary_view.php(98): TemplateConfig->getTemplateForFile("./css/background-image.css", TemplateManifest)
093 >
094 <?php echo (empty(substr(strrchr($file, DIRECTORY_SEPARATOR), 1)))?$file:substr(strrchr($file, DIRECTORY_SEPARATOR), 1) ;?>
095 </a>
096 </div>
097 <div class="col-sm-3">
098 <?php if ( $oEditedTemplate->getTemplateForFile($file, $oEditedTemplate)->sTemplateName == $oEditedTemplate->sTemplateName):?>
099 <span class="label label-success">
100 <?php eT("local"); ?>
101 </span>
102 <?php else: ?>
103 <span class="label label-danger">
#1
– D:\dev\lsgit\framework\web\CBaseController.php(126): require("D:\dev\lsgit\application\views\admin\templates\templatesummary_v...")
121 $data=$data;
122 if($return)
123 {
124 ob_start();
125 ob_implicit_flush(false);
126 require($viewFile);
127 return ob_get_clean();
128 }
129 else
130 require($viewFile);
131 }
#2
– D:\dev\lsgit\framework\web\CBaseController.php(95): CBaseController->renderInternal("D:\dev\lsgit\application\views/admin/templates/templatesummary_v...", array("fullpagebar" => array("returnbutton" => true), "templateclasseditormode" => "default", "time" => "171017190614", "oEditedTemplate" => TemplateManifest, ...), true)
090 {
091 $widgetCount=count($this->_widgetStack);
092 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile))
093 $content=$renderer->renderFile($this,$viewFile,$data,$return);
094 else
095 $content=$this->renderInternal($viewFile,$data,$return);
096 if(count($this->_widgetStack)===$widgetCount)
097 return $content;
098 else
099 {
100 $widget=end($this->_widgetStack);
#3
– D:\dev\lsgit\framework\web\CController.php(872): CBaseController->renderFile("D:\dev\lsgit\application\views/admin/templates/templatesummary_v...", array("fullpagebar" => array("returnbutton" => true), "templateclasseditormode" => "default", "time" => "171017190614", "oEditedTemplate" => TemplateManifest, ...), true)
867 /
868 public function renderPartial($view,$data=null,$return=false,$processOutput=false)
869 {
870 if(($viewFile=$this->getViewFile($view))!==false)
871 {
872 $output=$this->renderFile($viewFile,$data,true);
873 if($processOutput)
874 $output=$this->processOutput($output);
875 if($return)
876 return $output;
877 else
#4
– D:\dev\lsgit\application\core\Survey_Common_Action.php(327): CController->renderPartial("/admin/templates/templatesummary_view", array("fullpagebar" => array("returnbutton" => true), "templateclasseditormode" => "default", "time" => "171017190614", "oEditedTemplate" => TemplateManifest, ...))
322 elseif (is_array($viewUrl))
323 {
324 foreach ($viewUrl as $aSubData)
325 {
326 $aSubData = array_merge($aData, $aSubData);
327 Yii::app()->getController()->renderPartial($sViewPath . $sViewKey, $aSubData);
328 }
329 }
330 }
331 else
332 {
#5
– D:\dev\lsgit\application\controllers\admin\templates.php(1135): Survey_Common_Action->_renderWrappedTemplate("templates", array("templateeditorbar_view" => array(array("sitename" => "Lime3.0", "thissurvey" => array("active" => "Y", "name" => "Template Sample", "description" => "<p>This is a sample survey description. It could be quite long.<...", "welcome" => "<p>Welcome to this sample survey<p><p>You should have a great ti...", ...), "codelanguage" => "en", "highlighter" => "html", ...)), "templatesummary_view" => array(array("templateclasseditormode" => "default", "time" => "171017190614", "oEditedTemplate" => TemplateManifest, "screenname" => "welcome", ...))), array("fullpagebar" => array("returnbutton" => true)))
1130
@param string|array $aViewUrls View url(s)
1131 @param array $aData Data to be passed on. Optional.
1132
/
1133 protected function _renderWrappedTemplate($sAction = 'templates', $aViewUrls = array(), $aData = array())
1134 {
1135 parent::_renderWrappedTemplate($sAction, $aViewUrls, $aData);
1136 }
1137 }
#6
– D:\dev\lsgit\application\controllers\admin\templates.php(365): templates->_renderWrappedTemplate("templates", array("templateeditorbar_view" => array(array("sitename" => "Lime3.0", "thissurvey" => array("active" => "Y", "name" => "Template Sample", "description" => "<p>This is a sample survey description. It could be quite long.<...", "welcome" => "<p>Welcome to this sample survey<p><p>You should have a great ti...", ...), "codelanguage" => "en", "highlighter" => "html", ...)), "templatesummary_view" => array(array("templateclasseditormode" => "default", "time" => "171017190614", "oEditedTemplate" => TemplateManifest, "screenname" => "welcome", ...))), array("fullpagebar" => array("returnbutton" => true)))
360 App()->getClientScript()->registerScriptFile( App()->getConfig('adminscripts') . 'notifications.js');
361 App()->getClientScript()->registerPackage('ace');
362 App()->getClientScript()->registerPackage('jsuri');
363 $aData['fullpagebar']['returnbutton']=true;
364
365 $this->_renderWrappedTemplate('templates', $aViewUrls, $aData);
366 // This helps handle the load/save buttons)
367 if ($screenname != 'welcome')
368 {
369 Yii::app()->session['step'] = 1;
370 }
#7
unknown(0): templates->index("", "welcome", "copy_of_vanilla")
#8
– D:\dev\lsgit\framework\web\actions\CAction.php(109): ReflectionMethod->invokeArgs(templates, array("", "welcome", "copy_of_vanilla"))
104 elseif($param->isDefaultValueAvailable())
105 $ps[]=$param->getDefaultValue();
106 else
107 return false;
108 }
109 $method->invokeArgs($object,$ps);
110 return true;
111 }
112 }
#9
– D:\dev\lsgit\application\core\Survey_Common_Action.php(87): CAction->runWithParamsInternal(templates, ReflectionMethod, array("templatename" => "copy_of_vanilla", "sa" => "view"))
82 $oMethod = new ReflectionMethod($this, $sDefault);
83 }
84
85 // We're all good to go, let's execute it
86 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
87 return parent::runWithParamsInternal($this, $oMethod, $params);
88 }
89
90 /

91 Some functions have different parameters, which are just an alias of the
92
usual parameters we're getting in the url. This function just populates
#10
– D:\dev\lsgit\application\controllers\admin\templates.php(33): Survey_Common_Action->runWithParams(array("templatename" => "copy_of_vanilla", "sa" => "view"))
28 {
29 if (!Permission::model()->hasGlobalPermission('templates','read')){
30 die('No permission');
31 }
32
33 parent::runWithParams($params);
34 }
35
36 /
37 Exports a template
38

#11
– D:\dev\lsgit\framework\web\CController.php(308): templates->runWithParams(array("templatename" => "copy_of_vanilla", "sa" => "view"))
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;
#12
– D:\dev\lsgit\framework\web\CController.php(286): CController->runAction(templates)
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();
#13
– D:\dev\lsgit\framework\web\CController.php(265): CController->runActionWithFilters(templates, 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);
#14
– D:\dev\lsgit\application\controllers\AdminController.php(179): CController->run("templates")
174 $this->redirect(array('/admin/authentication/sa/login'));
175 }
176 }
177 }
178
179 return parent::run($action);
180 }
181
182 /

183 Routes all the actions to their respective places
184

#15
– D:\dev\lsgit\framework\web\CWebApplication.php(282): AdminController->run("templates")
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)));
#16
– D:\dev\lsgit\framework\web\CWebApplication.php(141): CWebApplication->runController("admin/templates/sa/view")
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.
#17
– 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 /

#18
– 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-17 19:06:14 Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30 Yii Framework/1.1.18

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)3.0 GIT
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionnn
Server OS (if known)nn
Webserver software & version (if known)nn
PHP Version5.5.30

Users monitoring this issue

There are no users monitoring this issue.

Activities

tammo

tammo

2017-10-17 19:08

developer   ~44715

And when you do it again: Directory with the name copy_of_vanilla already exists; choose another name

tammo

tammo

2017-10-17 19:21

developer   ~44716

Only happens with vanilla. The other templates can be copied fine. Never liked vanilla ice creams.

LouisGac

LouisGac

2017-10-18 14:37

developer   ~44721

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=24151

tammo

tammo

2017-10-19 11:25

developer   ~44731

Checked. OK now

Related Changesets

LimeSurvey: develop e94b65a3

2017-10-18 14:37:00

LouisGac

Details Diff
Fixed issue 12800: Crash when copy_of_vanilla Affected Issues
12800
mod - templates/vanilla/config.xml Diff File
mod - templates/vanilla/views/layout_errors.twig Diff File

Issue History

Date Modified Username Field Change
2017-10-17 19:07 tammo New Issue
2017-10-17 19:07 tammo Status new => assigned
2017-10-17 19:07 tammo Assigned To => LouisGac
2017-10-17 19:08 tammo Note Added: 44715
2017-10-17 19:21 tammo Note Added: 44716
2017-10-18 14:37 LouisGac Changeset attached => LimeSurvey develop e94b65a3
2017-10-18 14:37 LouisGac Note Added: 44721
2017-10-18 14:37 LouisGac Resolution open => fixed
2017-10-19 11:25 tammo Status assigned => resolved
2017-10-19 11:25 tammo Note Added: 44731
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