Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Unable to copy/edit templates

  • penguintrax
  • penguintrax's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #136370 by penguintrax
Unable to copy/edit templates was created by penguintrax
Directory permissions are set per: manual.limesurvey.org/Installation#Set_Directory_permissions

When I hover over the Import, Export, or Copy I get the standard "set directory permissions' error message.

I don't know where else to look to get this to work.

Server specs: Linux 2.6.32-504.3.3.el6.x86_64 #1
PHP Version 5.5.19
CENTOS 6.7
The topic has been locked.
  • penguintrax
  • penguintrax's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 9 months ago #136427 by penguintrax
Replied by penguintrax on topic Unable to copy/edit templates
Just as an update, if I use Create for the template, this is the stack trace I get when I try to save a change:

/home/apexsurvey/public_html/application/controllers/admin/templates.php(990)

0978 }
0979
0980 if (is_file(Yii::app()->getConfig('usertemplaterootdir') . '/' . $templatename . '/question_start.pstpl') && $screenname=='question') {
0981 $files[] = array('name' => 'question_start.pstpl');
0982 $screens[] = 'question_start.pstpl';
0983 }
0984
0985 // The extension is now set as a prefix separated by a _
0986 $file_datas = explode("_", $editfile);
0987 $extension = $file_datas[0];
0988
0989 // The file name is now based on the index of the oTemplate files
0990 $file_index = $file_datas[1];
0991 switch($extension)
0992 {
0993 case 'css':
0994 $aTemplateFiles = (array) $oEditedTemplate->config->files_editable->css->filename;
0995 break;
0996 case 'js':
0997 $aTemplateFiles = (array) $oEditedTemplate->config->files_editable->js->filename;
0998 break;
0999 case 'pstpl':
1000 $aTemplateFiles = $screens[$screenname];
1001 break;
1002 default:
Stack Trace
#0
– /home/apexsurvey/public_html/application/controllers/admin/templates.php(382): templates->_initialise("EGS", "welcome", "", true, ...)
377 // Redirect to the default template
378 Yii::app()->setFlashMessage(sprintf(gT('Template %s does not exist.'),htmlspecialchars($templatename,ENT_QUOTES)),'error');
379 $this->getController()->redirect(array('admin/templates/sa/view/','templatename'=>'default'));
380 }
381
382 $aViewUrls = $this->_initialise($templatename, $screenname, $editfile, true, true);
383
384 App()->getClientScript()->reset();
385 $this->registerScriptFile( 'ADMIN_SCRIPT_PATH', 'admin_core.js');
386 $this->registerScriptFile( 'ADMIN_SCRIPT_PATH', 'templates.js');
387 App()->getClientScript()->registerPackage('ace');
#1
unknown(0): templates->index()
#2
+ /home/apexsurvey/public_html/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(templates, array())
#3
– /home/apexsurvey/public_html/application/core/Survey_Common_Action.php(101): CAction->runWithParamsInternal(templates, ReflectionMethod, array("editfile" => "", "screenname" => "welcome", "templatename" => "EGS", "sa" => "view"))
096 $oMethod = new ReflectionMethod($this, $sDefault);
097 }
098
099 // We're all good to go, let's execute it
100 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
101 return parent::runWithParamsInternal($this, $oMethod, $params);
102 }
103
104 /**
105 * Some functions have different parameters, which are just an alias of the
106 * usual parameters we're getting in the url. This function just populates
#4
– /home/apexsurvey/public_html/application/controllers/admin/templates.php(33): Survey_Common_Action->runWithParams(array("editfile" => "", "screenname" => "welcome", "templatename" => "EGS", "sa" => "view"))
28 {
29 if (!Permission::model()->hasGlobalPermission('templates','read'))
30 {
31 die('No permission');
32 }
33 parent::runWithParams($params);
34 }
35
36 /**
37 * Exports a template
38 *
#5
+ /home/apexsurvey/public_html/framework/web/CController.php(308): templates->runWithParams(array("editfile" => "", "screenname" => "welcome", "templatename" => "EGS", "sa" => "view"))
#6
+ /home/apexsurvey/public_html/framework/web/CController.php(286): CController->runAction(templates)
#7
+ /home/apexsurvey/public_html/framework/web/CController.php(265): CController->runActionWithFilters(templates, array())
#8
+ /home/apexsurvey/public_html/application/controllers/AdminController.php(160): CController->run("templates")
#9
+ /home/apexsurvey/public_html/framework/web/CWebApplication.php(282): AdminController->run("templates")
#10
+ /home/apexsurvey/public_html/framework/web/CWebApplication.php(141): CWebApplication->runController("admin/templates/sa/view")
#11
+ /home/apexsurvey/public_html/framework/base/CApplication.php(185): CWebApplication->processRequest()
#12
+ /home/apexsurvey/public_html/index.php(212): CApplication->run()
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 9 months ago #136458 by DenisChenu
Replied by DenisChenu on topic Unable to copy/edit templates
Maybe a bug to be reported.

Else : the file you have (with the stack trace) have some color : it's really better if we sse the color (you can save it as HTML and attch ro a bug).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose