View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
06441Bug reportsStatisticspublic2012-10-09 22:39
ReporterMazi Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92+ 
Target Version1.92+Fixed in Version2.00+ 
Summary06441: Public statistics is missing <body> tag and doesn't make use of defined template
Description

The public statistics look a little broken, e.g. no <body> tag exists at the page and it also doesn't seem to make use of the current template and related CSS styles.

Steps To Reproduce

Import the attached survey.
Answer the survey 1-2 times.
Check ...statistics_user.php?sid=95145

TagsNo tags attached.
Attached Files
publicstats.png (54,831 bytes)   
publicstats.png (54,831 bytes)   
statistics_user.html (5,594 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>
<script type="text/javascript" src="http://localhost/git/stable/scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="http://localhost/git/stable/scripts/jquery/jquery-ui.js"></script>
<link href="http://localhost/git/stable/scripts/jquery/css/start/jquery-ui.css" media="all" type="text/css" rel="stylesheet" /><link href="http://localhost/git/stable/scripts/jquery/css/start/lime-progress.css" media="all" type="text/css" rel="stylesheet" /><div id="pfrm8e124d" style="position:absolute;top:80px;left:50px;width:320px;height:90px;border:2px solid;border-color:#dfdfdf #404040 #404040 #dfdfdf;background:#c0c0c0;">
<div id="pbrd8e124d" style="position:absolute;top:25px;left:10px;width:300px;height:25px;background:#c0c0c0;border:1px solid;border-color:#404040 #dfdfdf #dfdfdf #404040;">
<div id="pbar8e124d" style="position:absolute;top:2px;left:2px;width:0px;height:21px;background:#0033ff;"></div></div>
<div id="plbltxt18e124d" style="position:absolute;top:9px;left:10px;text-align:left;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;">Please wait ...</div>
<div id="plblpct18e124d" style="position:absolute;top:9px;left:260px;text-align:right;width:50px;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;">0%</div>
<div><input id="plblbtn18e124d" type="button" value="Go back" style="position:absolute;top:60px;left:10px;text-align:center;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;" onclick="self.location.href='?action=statistics&amp;sid=95145'" /></div>
</div>
<script type="text/JavaScript">
/* <![CDATA[ */function PBposition8e124d(item,pixel) {
 pixel = parseInt(pixel);
 switch(item) {
  case "left": document.getElementById("pbar8e124d").style.left=(pixel) + 'px'; break;
  case "top": document.getElementById("pbar8e124d").style.top=(pixel) + 'px'; break;
  case "width": document.getElementById("pbar8e124d").style.width=(pixel) + 'px'; break;
  case "height": document.getElementById("pbar8e124d").style.height=(pixel) + 'px'; break;
 }
}
function PBlabelText8e124d(name,text) {
 name = "plbl" + name + "8e124d";
 document.getElementById(name).firstChild.nodeValue=text;
}
/* ]]> */</script>
<script type="text/JavaScript">
            /* <![CDATA[ */              
            PBlabelText8e124d("txt1","Getting questions and answers ...");
            /* ]]> */              
            </script>
<script type="text/JavaScript">
/* <![CDATA[ */
PBposition8e124d("width",15);PBlabelText8e124d("pct1","5%");
/* ]]> */
</script>
<script type="text/JavaScript">
            /* <![CDATA[ */              
            PBlabelText8e124d("txt1","Generating summaries ...");
            /* ]]> */              
            </script>
<script type="text/JavaScript">
/* <![CDATA[ */
PBposition8e124d("width",118);PBlabelText8e124d("pct1","40%");
/* ]]> */
</script>
<script type="text/JavaScript">
/* <![CDATA[ */
PBposition8e124d("width",121);PBlabelText8e124d("pct1","41%");
/* ]]> */
</script>
<script type="text/JavaScript">
            /* <![CDATA[ */              
            PBlabelText8e124d("txt1","Completed");
            /* ]]> */              
            </script>
<script type="text/JavaScript">
/* <![CDATA[ */
PBposition8e124d("width",296);PBlabelText8e124d("pct1","100%");
/* ]]> */
</script>
<script type="text/JavaScript">document.getElementById("pbrd8e124d").style.visibility="hidden";document.getElementById("pbar8e124d").style.visibility="hidden";document.getElementById("pfrm8e124d").style.visibility="hidden";document.getElementById("plbltxt18e124d").style.visibility="hidden";document.getElementById("plblpct18e124d").style.visibility="hidden";document.getElementById("plblbtn18e124d").style.visibility="hidden";</script>

<div id='statsContainer'>
	<div id='statsHeader'> 
		<div class='statsSurveyTitle'>EM rand() Test</div>
		<div class='statsNumRecords'>Total records in survey : 7</div>
	</div>
<br />
<table class='statisticssummary' >
	<thead><tr><th colspan='2'>Results</th></tr></thead>
	<tr><th >Number of records in this query:</th><td>22</td></tr>
	<tr><th>Total records in survey:</th><td>22</td></tr>
	<tr><th align='right'>Percentage of total:</th><td>100.00%</td></tr>
</table>
<table class='statisticstable'>
	<thead><tr><th colspan='4' align='center'><strong>Field summary for yn</strong></th></tr>
	<tr><th colspan='4' align='center'><strong>Create random number?</strong></th></tr>
	<tr>
		<th width='50%' align='center' ><strong>Answer</strong></th>
		<th width='25%' align='center' ><strong>Count</strong></th>
		<th width='25%' align='center' ><strong>Percentage</strong></th>
	</tr></thead>
	<tr>
		<td align='center' >Yes, give me that number (1)
		</td>
		<td align='center' >4
</td>		<td align='center' >18.18%				&nbsp;</td>
	</tr>
	<tr>
		<td align='center' >No, thanks (2)
		</td>
		<td align='center' >3
</td>		<td align='center' >13.64%				&nbsp;</td>
	</tr>
	<tr>
		<td align='center' >No answer
		</td>
		<td align='center' >2
</td>		<td align='center' >9.09%				&nbsp;</td>
	</tr>
	<tr>
		<td align='center' >Not completed or Not displayed
		</td>
		<td align='center' >13
</td>		<td align='center' >59.09%				&nbsp;</td>
	</tr>
<tr><td colspan='4' style="text-align:center"><img src="http://localhost/git/stable/tmp/430da214bfb8dd206fda5327dc0dd7f3.png" border='1' /></td></tr></table><br /> 
<br />&nbsp;
<br />
</div>


	</body>
</html>
statistics_user.html (5,594 bytes)   
Bug heat6
Complete LimeSurvey version number (& build)120806
I will donate to the project if issue is resolvedNo
BrowserFirefox 14
Database type & versionMySQL 5
Server OS (if known)Windows 7
Webserver software & version (if known)Apache 2.2
PHP Version5.3.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-08-07 15:45

administrator   ~20249

It looks fine to me and makes use of the current template?

It uses only startpage and endpage, though. So you have to make sure those two result in valid HTML.

Mazi

Mazi

2012-08-20 11:27

updater   ~20543

I can still reproduce the problem but only locally on my server, at demo.limesurvey.org it works fine.

I have imported the same survey and template as used at the Limesurvey demo and still the generated HTML is broken.
Tested with FF 14 and latest Chrome.

I'm out of ideas why this problem shows up ion my system only...

Mazi

Mazi

2012-08-20 11:27

updater   ~20544

Should we just keep this bug in case someone else runs into the same problem?

c_schmitz

c_schmitz

2012-10-02 14:57

administrator   ~20981

Do you still have this problem with 2.0?

Mazi

Mazi

2012-10-02 16:24

updater   ~20985

There still seems to be the same problem with Limesurvey 2, see this test link using the shipped default template: http://limesurvey-templates.com/20/index.php/statistics_user/action/surveyid/784679/language/en

c_schmitz

c_schmitz

2012-10-07 14:04

administrator   ~21107

The link above looks just fine to me?

DenisChenu

DenisChenu

2012-10-07 14:41

developer   ~21111

No, you have a lot of thing before DOCTYPE

<div id="pfrm0329f7" style="position:absolute;top:80px;left:50px;width:320px;height:90px;border:2px solid;border-color:#dfdfdf #404040 #404040 #dfdfdf;background:#c0c0c0;">
<div id="pbrd0329f7" style="position:absolute;top:25px;left:10px;width:300px;height:25px;background:#c0c0c0;border:1px solid;border-color:#404040 #dfdfdf #dfdfdf #404040;">
<div id="pbar0329f7" style="position:absolute;top:2px;left:2px;width:0px;height:21px;background:#0033ff;"></div></div>
<div id="plbltxt10329f7" style="position:absolute;top:9px;left:10px;text-align:left;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;">Please wait ...</div>
<div id="plblpct10329f7" style="position:absolute;top:9px;left:260px;text-align:right;width:50px;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;">0%</div>
<div><input id="plblbtn10329f7" type="button" value="Go back" style="position:absolute;top:60px;left:10px;text-align:center;font-size:11px;font-family:Verdana, Tahoma, Arial;font-weight:normal;" onclick="self.location.href='?action=statistics&sid=784679'" /></div>
</div>
<script type="text/JavaScript">
/ <![CDATA[ /function PBposition0329f7(item,pixel) {
pixel = parseInt(pixel);
switch(item) {
case "left": document.getElementById("pbar0329f7").style.left=(pixel) + 'px'; break;
case "top": document.getElementById("pbar0329f7").style.top=(pixel) + 'px'; break;
case "width": document.getElementById("pbar0329f7").style.width=(pixel) + 'px'; break;
case "height": document.getElementById("pbar0329f7").style.height=(pixel) + 'px'; break;
}
}
function PBlabelText0329f7(name,text) {
name = "plbl" + name + "0329f7";
document.getElementById(name).firstChild.nodeValue=text;
}
/ ]]> /</script>
<script type="text/JavaScript">
/ <![CDATA[ /
PBlabelText0329f7("txt1","Getting questions and answers ...");
/ ]]> /
</script>
<script type="text/JavaScript">
/ <![CDATA[ /
PBposition0329f7("width",15);PBlabelText0329f7("pct1","5%");
/ ]]> /
</script>
<script type="text/JavaScript">
/ <![CDATA[ /
PBlabelText0329f7("txt1","Completed");
/ ]]> /
</script>
<script type="text/JavaScript">
/ <![CDATA[ /
PBposition0329f7("width",296);PBlabelText0329f7("pct1","100%");
/ ]]> /
</script>
<script type="text/JavaScript">document.getElementById("pbrd0329f7").style.visibility="hidden";document.getElementById("pbar0329f7").style.visibility="hidden";document.getElementById("pfrm0329f7").style.visibility="hidden";document.getElementById("plbltxt10329f7").style.visibility="hidden";document.getElementById("plblpct10329f7").style.visibility="hidden";document.getElementById("plblbtn10329f7").style.visibility="hidden";</script>

Thik it's the old user statitics functionnality ?

Denis

Mazi

Mazi

2012-10-08 10:43

updater   ~21117

Yeah, the code Denis posted above is really weird. I have no idea where this results from.

Also, no survey results or charts are shown.

c_schmitz

c_schmitz

2012-10-08 11:31

administrator   ~21119

well, that's from the javascript progress indicator.
Anyway, the question wasn't if any results for charts are shown but if the <body> tag is missing. I can see it is not missing.

Mazi

Mazi

2012-10-08 12:13

updater   ~21120

Well, the body tag is there, but that doesn't make the feature working. We can also rename the bug title to "Public statistics is missing result data and charts".

c_schmitz

c_schmitz

2012-10-09 16:25

administrator   ~21132

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9680

c_schmitz

c_schmitz

2012-10-09 22:39

administrator   ~21141

2.00+ Build 121009 released. Please update.

Related Changesets

LimeSurvey: master 807a1379

2012-10-09 08:06

c_schmitz


Details Diff
Fixed issue 06441: Public statistics is missing result data and charts Affected Issues
06441
mod - application/controllers/Statistics_userController.php Diff File
mod - application/helpers/admin/statistics_helper.php Diff File
mod - application/views/statistics_user_view.php Diff File
add - scripts/statistics_user.js Diff File

Issue History

Date Modified Username Field Change
2012-08-06 18:24 Mazi New Issue
2012-08-06 18:24 Mazi Status new => assigned
2012-08-06 18:24 Mazi Assigned To => c_schmitz
2012-08-06 18:24 Mazi File Added: limesurvey_survey_95145.lss
2012-08-07 15:45 c_schmitz Note Added: 20249
2012-08-07 15:45 c_schmitz Assigned To c_schmitz => Mazi
2012-08-07 15:45 c_schmitz Status assigned => feedback
2012-08-20 11:23 Mazi File Added: publicstats.png
2012-08-20 11:25 Mazi File Added: statistics_user.html
2012-08-20 11:27 Mazi Note Added: 20543
2012-08-20 11:27 Mazi Status feedback => assigned
2012-08-20 11:27 Mazi Assigned To Mazi => c_schmitz
2012-08-20 11:27 Mazi Status assigned => acknowledged
2012-08-20 11:27 Mazi Note Added: 20544
2012-10-02 14:57 c_schmitz Note Added: 20981
2012-10-02 14:57 c_schmitz Status acknowledged => feedback
2012-10-02 16:24 Mazi Note Added: 20985
2012-10-02 16:24 Mazi Status feedback => assigned
2012-10-07 14:04 c_schmitz Note Added: 21107
2012-10-07 14:04 c_schmitz Status assigned => feedback
2012-10-07 14:41 DenisChenu Note Added: 21111
2012-10-08 10:43 Mazi Note Added: 21117
2012-10-08 10:43 Mazi Status feedback => assigned
2012-10-08 11:31 c_schmitz Note Added: 21119
2012-10-08 12:13 Mazi Note Added: 21120
2012-10-09 16:25 c_schmitz Changeset attached => LimeSurvey master 807a1379
2012-10-09 16:25 c_schmitz Note Added: 21132
2012-10-09 16:25 c_schmitz Resolution open => fixed
2012-10-09 16:25 c_schmitz Status assigned => resolved
2012-10-09 16:25 c_schmitz Fixed in Version => 2.00+
2012-10-09 22:39 c_schmitz Note Added: 21141
2012-10-09 22:39 c_schmitz Status resolved => closed