View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06152Bug reportsTheme editorpublic2012-07-27 13:21
Reporteruser20152Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.00RC2 
Fixed in Version2.00RC7 
Summary06152: Unable to edit Question page of Vallendar Template
Description

When trying to load the Question page of the Vallendar template, the template editor crashes with the PHP Notice attached / pasted below:

PHP notice

Undefined index: type

/homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/helpers/replacements_helper.php(280)

268 $_question_help = $question['help'];
269 $_question_mandatory = $question['mandatory'];
270 $_question_man_message = $question['man_message'];
271 $_question_valid_message = $question['valid_message'];
272 $_question_file_valid_message = $question['file_valid_message'];
273 $_question_sgq = (isset($question['sgq']) ? $question['sgq'] : '');
274 $_question_essentials = $question['essentials'];
275 $_getQuestionClass = $question['class'];
276 $_question_man_class = $question['man_class'];
277 $_question_input_error_class = $question['input_error_class'];
278 $_question_number = $question['number'];
279 $_question_code = $question['code'];
280 $_question_type = $question['type'];
281 }
282 else
283 {
284 $_question = isset($question) ? $question : '';
285 $_question_text = '';
286 $_question_help = '';
287 $_question_mandatory = '';
288 $_question_man_message = '';
289 $_question_valid_message = '';
290 $_question_file_valid_message = '';
291 $_question_sgq = '';
292 $_question_essentials = '';
Stack Trace
#0
– /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/helpers/admin/template_helper.php(25): templatereplace("<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTIONMAN...", array(), array("thissurvey" => array("active" => "Y", "name" => "Template Sample", "description" => "This is a sample survey description. It could be quite long.<br ...", "welcome" => "Welcome to this sample survey<br />You should have a great time ...", ...), "percentcomplete" => "<script type="text/javascript"> $(document).ready(functi...", "groupname" => "Group 1: The first lot of questions", "groupdescription" => "This group description is fairly vacuous, but quite important.", ...))
20 foreach(file($file) as $op) {
21 $output[]=templatereplace($op);
22 }
23 return $output;
24 /
25 return (array)templatereplace(file_get_contents($file),array(),$data);
26 }
27
28
29
30 function getListOfFiles($wh){
#1
– /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/controllers/admin/templates.php(929): doreplacement("/homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/temp...", array("thissurvey" => array("active" => "Y", "name" => "Template Sample", "description" => "This is a sample survey description. It could be quite long.<br ...", "welcome" => "Welcome to this sample survey<br />You should have a great time ...", ...), "percentcomplete" => "<script type="text/javascript"> $(document).ready(functi...", "groupname" => "Group 1: The first lot of questions", "groupdescription" => "This group description is fairly vacuous, but quite important.", ...))
924 );
925 $aData['question'] = $question;
926
927 $answer = $this->getController()->render('/admin/templates/templateeditor_question_answer_view', array(), true);
928 $aData['answer'] = $answer;
929 $myoutput = array_merge($myoutput, doreplacement(getTemplatePath($templatename) . "/question.pstpl", $aData));
930
931 $answer = $this->getController()->render('/admin/templates/templateeditor_question_answer_view', array('alt' => true), true);
932 $aData['answer'] = $answer;
933 $question = array(
934 'all' => '<span class="asterisk">
</span>' . $clang->gT("Please explain something in detail:"),
#2
– /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/controllers/admin/templates.php(271): templates->_initialise("vallendar", "question", "startpage.pstpl")
266 @param string $templatename
267
@return void
268 */
269 public function index($editfile = 'startpage.pstpl', $screenname = 'welcome', $templatename = 'default')
270 {
271 $aViewUrls = $this->_initialise($templatename, $screenname, $editfile);
272 $this->getController()->_js_admin_includes(Yii::app()->getConfig('adminscripts') . 'templates.js');
273 $this->getController()->_css_admin_includes(Yii::app()->getConfig('adminscripts') . 'codemirror_ui/lib/CodeMirror-2.0/lib/codemirror.css');
274 $this->getController()->_css_admin_includes(Yii::app()->getConfig('adminscripts') . 'codemirror_ui/lib/CodeMirror-2.0/mode/css/css.css');
275 $this->getController()->_css_admin_includes(Yii::app()->getConfig('adminscripts') . 'codemirror_ui/lib/CodeMirror-2.0/mode/javascript/javascript.css');
276 $this->getController()->_css_admin_includes(Yii::app()->getConfig('adminscripts') . 'codemirror_ui/lib/CodeMirror-2.0/mode/xml/xml.css');
#3
unknown(0): templates->index("startpage.pstpl", "question", "vallendar")
#4

  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/actions/CAction.php(107): ReflectionMethod->invokeArgs(templates, array("startpage.pstpl", "question", "vallendar"))
    #5
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/core/Survey_Common_Action.php(82): CAction->runWithParamsInternal(templates, ReflectionMethod, array("editfile" => "startpage.pstpl", "screenname" => "question", "templatename" => "vallendar", "sa" => "view"))
    #6
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/CController.php(309): Survey_Common_Action->runWithParams(array("editfile" => "startpage.pstpl", "screenname" => "question", "templatename" => "vallendar", "sa" => "view"))
    #7
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/CController.php(287): CController->runAction(templates)
    #8
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/CController.php(266): CController->runActionWithFilters(templates, array())
    #9
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/application/controllers/AdminController.php(158): CController->run("templates")
    #10
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/CWebApplication.php(276): AdminController->run("templates")
    #11
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/web/CWebApplication.php(135): CWebApplication->runController("admin/templates/sa/view")
    #12
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/framework/base/CApplication.php(162): CWebApplication->processRequest()
    #13
  • /homepages/6/d94567437/htdocs/ls.jonwestfall.com/limesurvey/index.php(171): CApplication->run()
    2012-05-30 08:49:10 Apache Yii Framework/1.1.10
Steps To Reproduce

Try to edit the Vallendar template's question page in the editor.

TagsNo tags attached.
Attached Files
PHP notice.pdf (186,268 bytes)
Bug heat6
Complete LimeSurvey version number (& build)120528
I will donate to the project if issue is resolvedNo
Browser
Database type & versionunknown
Server OS (if known)Linux (2.6.28.8-20101130b-iscsi-ntacker-fasync-mremap-amd-sec6-grsec )
Webserver software & version (if known)Apache
PHP Version5.2.17

Users monitoring this issue

choffman

Activities

Mazi

Mazi

2012-05-30 16:28

updater   ~18999

I can reproduce the problem with the valendar template and question page screen but with the default template as well for the same screen.
So it seems to be related to the question screen and not a certain template.

choffman

choffman

2012-06-08 16:21

reporter   ~19121

I made a fresh copy of the default template, and tried to navigate to the Question page using the right-hand dropdown box. I got the same error.

Issue History

Date Modified Username Field Change
2012-05-30 14:53 user20152 New Issue
2012-05-30 14:53 user20152 File Added: PHP notice.pdf
2012-05-30 16:28 Mazi Note Added: 18999
2012-05-30 16:28 Mazi Assigned To => dionet
2012-05-30 16:28 Mazi Status new => assigned
2012-06-08 16:20 choffman Issue Monitored: choffman
2012-06-08 16:21 choffman Note Added: 19121
2012-07-27 13:21 c_schmitz Status assigned => closed
2012-07-27 13:21 c_schmitz Assigned To dionet => c_schmitz
2012-07-27 13:21 c_schmitz Resolution open => fixed
2012-07-27 13:21 c_schmitz Fixed in Version => 2.00RC7
2015-12-11 14:40 c_schmitz Category Templates => Theme editor
2021-09-07 12:04 guest Bug heat 4 => 6