View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
07991Bug reportsSurvey takingpublic2013-09-24 14:20
ReporterDenisChenu Assigned Tosammousa  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05 RC 
Target Version2.05 RCFixed in Version2.05 RC 
Summary07991: No js file included in welcome page
Description

When start a new survey, there are no js file included.

Steps To Reproduce

Look at source of:
205.sondages.pro/index.php/survey/index/sid/87262/newtest/Y/lang/fr (but better with yor own link because maybe i break my 205 installation)

Additional Information

The registerscriptfile is a reaaly good solution, but seems to be broken in template_replace in some condition (have ever tested for 2.0 before but : no js on all survey).

Think it break too survey in one page (not sure).

2 solution:

  • remove TEMPLATEJS and use registerScriptFile in js_header_include (maybe it do the trick) : but stay with 'template can replace a js file if possible'
  • Use same than 2.0 for 2.05 and find the better way for 2.1

PS:
Github commit : https://github.com/LimeSurvey/LimeSurvey/commit/e0689febb7f1d38a56eb4f4d41e7dd48363931cf

But this one: https://github.com/LimeSurvey/LimeSurvey/commit/e90c89b7a597cc346d4bc748e01630a5a935ae8a not included (have App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."expressions/em_javascript.js");.

TagsNo tags attached.
Attached Files
Sample LimeSurvey for v1.91 EN_FR_DE LimeSurvey 205.html (5,331 bytes)   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>Sample LimeSurvey for v1.91 EN/FR/DE  LimeSurvey 205</title>
    <meta name="generator" content="LimeSurvey http://www.limesurvey.org" />
    <meta name="viewport" content="width=device-width" />
    <!-- The following line includes jquery-ui.css or jquery-ui-custom.css from template dir, template.css and needed specific css file for survey -->
    <link rel='stylesheet' type='text/css' media='all' href='/templates/citronade/jquery-ui.css' />
<link rel='stylesheet' type='text/css' media='all' href='/templates/citronade/template.css' />


    <link rel="shortcut icon" href="/templates/citronade/favicon.ico" />
    <!-- The following line includes jquery.js, jquery-ui.js, survey_runtime.js , template.js and needed specific js file for survey -->
    
    
</head>
<!--[if lt IE 7 ]> <body class="lang-en groupbygroup showprogress showqnumcode-X ie ie6 ielt7 ielt8 ielt9 no-js"> <![endif]-->
<!--[if IE 7 ]> <body class="lang-en groupbygroup showprogress showqnumcode-X ie ie7 ielt8 ielt9 no-js"> <![endif]-->
<!--[if IE 8 ]> <body class="lang-en groupbygroup showprogress showqnumcode-X ie ie8ielt9  no-js"> <![endif]-->
<!--[if IE 9 ]> <body class="lang-en groupbygroup showprogress showqnumcode-X ie ie9 no-js"> <![endif]-->
<!--[if gt IE 9]><!--><body id="body" class="lang-en groupbygroup showprogress showqnumcode-X no-js"><!--<![endif]-->
<script type='text/javascript'>/*<![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.getElementsByTagName('body')[0]);/*]]>*/</script>
<div id="container">
	<div id="head">
		<div class="wrapper">
			<!--<a href="#" title="Made with LimeSurvey" id="link-logo"><img src="/templates/citronade/logo.png" alt=" " id="logo"/></a>-->
			<div class="tools"><select id='languagechanger' name='languagechanger' class='languagechanger' onchange='javascript:window.location=this.value'>
<option value="/index.php/87262/lang-en"  selected='selected'>English</option>
<option value="/index.php/87262/lang-fr" >Fran&#231;ais</option>
<option value="/index.php/87262/lang-de-informal" >Deutsch (Du)</option>
</select>
</div><h1 id="sitename">LimeSurvey 205</h1>
		</div>
	</div>
<div id="title"><h2 id="surveytitle" class="wrapper">Sample LimeSurvey for v1.91 EN/FR/DE</h2></div>
	<div id="content" class="outerframe">
<form id="limesurvey" name="limesurvey" autocomplete="off" action="/index.php/survey/index" method="post">

<!-- START THE SURVEY -->
<noscript><span class='warningjs'>Caution: JavaScript execution is disabled in your browser. You may not be able to answer all questions in this survey. Please, verify your browser parameters.</span></noscript>
<div id="welcome">
	<p id='surveydescription' class="text">This survey show all question type of LimeSurvey with some option</p>
	<p id='surveywelcome' class="text"><p>
	This is the welcome text for the survey! You can can edit it in the survey properties.</p>
</p>
	<p id="therearexquestions" class="text">There are 46 questions in this survey.</p>
</div>

	<p class="navigator"><input type="hidden" name="move" value="movenext" id="movenext" />	<button class='submit' type='submit' accesskey='n' onclick="javascript:document.limesurvey.move.value = 'movenext';"
        value='Next' name='move2' id='movenextbtn' >Next</button>
</p>
	<ul class="tools">
		<li>			<input type='button' name='loadall' value='Load unfinished survey' class='saveall' onclick="javascript:addHiddenField(document.getElementById('limesurvey'),'loadall',this.value);document.getElementById('limesurvey').submit();" /></li>
		<li><input type='button' name='clearallbtn' value='Exit and clear survey' class='clearall' onclick="if (confirm('Are you sure you want to clear all your responses?')) {
window.open('/index.php/87262?move=clearall&amp;lang=en', '_self')}" /></li>
	</ul>

<input type='hidden' name='sid' value='87262' id='sid' />

<input type='hidden' name='lastgroupname' value='_WELCOME_SCREEN_' id='lastgroupname' />
<input type='hidden' name='LEMpostKey' value='141292523' id='LEMpostKey' />
<input type='hidden' name='thisstep' id='thisstep' value='0' />

</form>
</div><!--endcontent-->
<div id="footer">
	<ul id="credits">
	<li id="poweredby" class="first"><a href="http://www.limesurvey.org/" title="LimeSurvey Website">Powered by LimeSurvey</a>
	<li id="licence">This template is distributed under <a href="http://www.gnu.org/licenses/gpl.txt">GPL licence</a> 
	</li>
	<li id="donate" class="last">LimeSurvey is Free software</li>
	</ul>
</div>
</div><!-- end container-->

<script type='text/javascript'>
<!--
var LEMmode='group';
var LEMgseq=-1;
function ExprMgr_process_relevance_and_tailoring(evt_type,sgqa,type){
if (typeof LEM_initialized == 'undefined') {
LEM_initialized=true;
LEMsetTabIndexes();
}
if (evt_type == 'onchange' && (typeof last_sgqa !== 'undefined' && sgqa==last_sgqa) && (typeof last_evt_type !== 'undefined' && last_evt_type == 'TAB' && type != 'checkbox')) {
  last_evt_type='onchange';
  last_sgqa=sgqa;
  return;
}
last_evt_type = evt_type;
last_sgqa=sgqa;

}
//-->
</script>


	</body>
</html>

Bug heat6
Complete LimeSurvey version number (& build)130709
I will donate to the project if issue is resolvedNo
BrowserFF
Database type & versionnot relevant
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.3

Relationships

related to 07967 closedc_schmitz Without javascript there are still present button that don't work in the survey : back, clear the survey, send it incomplete. 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2013-07-09 19:46

developer   ~25748

I assign it to you but think really your solution is better.

Correction : It work with "all in one" survey, js file are included. Only on welcome page .

Maybe we can remove the test of {TEMPLATEJS} to : registering multiple time can not break js. Maybe just use $staticJjIncluded=true; to don't do the job X times.

sammousa

sammousa

2013-07-12 11:18

reporter   ~25772

This has been fixed in 4a2d74dd2efc0f0af63e01bc59d5706ee465d6c4.

DenisChenu

DenisChenu

2013-07-12 11:32

developer   ~25773

https://github.com/LimeSurvey/LimeSurvey/commit/f26db5ac394c3765bbf2d3c2b44186970966107f seems to remove the ability to replace all css/js file in template.

Another opportunity to do this ?

sammousa

sammousa

2013-07-12 11:47

reporter   ~25775

No, it stays exactly the same.
If you include {TEMPLATEJS} it will register the template specific files. You can remove that tag and they wont be registered.

DenisChenu

DenisChenu

2013-07-12 12:03

developer   ~25776

I have to test, because i don't understand how it work :).

But great : we can use http://www.yiiframework.com/doc/api/1.1/CClientScript#registerScript-detail now ? (because tested before and no way ....)
And all other CClientScript function \o/

DenisChenu

DenisChenu

2013-07-12 17:23

developer   ~25778

Seem not fixed in welcome page (for me)
http://205.sondages.pro/index.php/survey/index/sid/87262/newtest/Y/lang/en

DenisChenu

DenisChenu

2013-07-12 19:01

developer   ~25779

But:

No possibility to replace js file for one in template now.
And all js inclusuon need review

Ranking : http://205.sondages.pro/index.php/survey/index/sid/891447/newtest/Y/lang/fr

Denis

c_schmitz

c_schmitz

2013-09-24 14:20

administrator   ~26339

2.05RC1 released

Issue History

Date Modified Username Field Change
2013-07-09 19:43 DenisChenu New Issue
2013-07-09 19:43 DenisChenu Status new => assigned
2013-07-09 19:43 DenisChenu Assigned To => sammousa
2013-07-09 19:43 DenisChenu File Added: Sample LimeSurvey for v1.91 EN_FR_DE LimeSurvey 205.html
2013-07-09 19:46 DenisChenu Note Added: 25748
2013-07-09 19:48 DenisChenu File Deleted: Sample LimeSurvey for v1.91 EN_FR_DE LimeSurvey 205.html
2013-07-09 19:48 DenisChenu File Added: Sample LimeSurvey for v1.91 EN_FR_DE LimeSurvey 205.html
2013-07-09 19:55 DenisChenu Summary No js file included when start a new survey => No js file included in welcome page
2013-07-12 10:46 DenisChenu Relationship added related to 07967
2013-07-12 11:18 sammousa Note Added: 25772
2013-07-12 11:18 sammousa Status assigned => resolved
2013-07-12 11:18 sammousa Resolution open => fixed
2013-07-12 11:32 DenisChenu Note Added: 25773
2013-07-12 11:47 sammousa Note Added: 25775
2013-07-12 12:03 DenisChenu Note Added: 25776
2013-07-12 17:23 DenisChenu Note Added: 25778
2013-07-12 19:01 DenisChenu Note Added: 25779
2013-09-23 13:37 c_schmitz Fixed in Version => 2.05 RC
2013-09-24 14:20 c_schmitz Note Added: 26339
2013-09-24 14:20 c_schmitz Status resolved => closed