View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05907Bug reportsOtherpublic2012-10-24 14:16
ReporterTMSWhite Assigned ToDenisChenu  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00a2 
Fixed in Version2.00+ 
Summary05907: slow load times, and first EM call not part of $('document').ready() function
Description

2.0 is loading test surveys about 2-4 times slower than 1.92. Also, when a page that has array_filter on it is loaded, we first see everything, and only see the proper things hidden a second or two after the page load. In 1.92, EM is called as part of the $('document').ready() function so that this does not occur

Steps To Reproduce

Test second page of /docs/demosurveys/ls2_validation_tests.lss

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)120311
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMysql 5.3
Server OS (if known)Windows XP
Webserver software & version (if known)XAMPP
PHP Version5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-10-16 21:12

reporter   ~21389

This is actually a bug. In 1.92, if you use array_filter, when you first visit a page, you only see questions that have been appropriately filtered. In 2.0, you first see all of the questions, and then the display refreshes to hide things that should be hid. This slows down page load time and can confuse users, plus is a regression of 1.92 functionality.

DenisChenu

DenisChenu

2012-10-18 10:57

developer   ~21425

TMSWhite:

I think function return_array_filter_strings is buggy in Yii.

Maybe a good solution is to use a "new function" checkRelevanceStatus and in do_* use this function to add <$method style="display:none" or <input disabled="disabled'

I put a quick draft for this function.

Then status are set in the HTML directly.

Still a problem with "no javascript user' : if their action have to show a line (or a question) then this question is not showing ...

For this one : maybe the best is to use a specific class:
class="emhide emdisabled"

In javascript, at document.ready : just $('.emhide').hide and .emdisabled').find(input:not(hidden)).attr('disabled','disabled');
BUT this can be done only after document loading.
We can use some
.js .emhide(display:none}
.js .emdisabled input(visibility:hidden}
in template.css

DenisChenu

DenisChenu

2012-10-18 12:16

developer   ~21430

Tom ?

Did there are already a samePage test function for Expression Manager somewhere ?

If yes:
We can use it to:

  • Do only EM in javascript for same page
  • Do only EM in HTML for different page

Denis

DenisChenu

DenisChenu

2012-10-23 00:37

developer   ~21547

Cartsen : i can take this one. For return_array_filter_strings buggy, think it's $_SESSION['relevanceStatus'] => $SESSION[survey{$sid}]['relevanceStatus'] in array_filter_string.
For 2.0: we can add a function checkRelevanceStatus in quanda_helper.

But for 2.1, i think we can add a checkRelevanceStatus function in QuestionModule class. And allways use specific class because no javascript user can not answer all response. This class can be hidden with js/no-js system in global.css.

If OK like this :
Asiign it to me

DenisChenu

DenisChenu

2012-10-23 00:39

developer   ~21548

A remark : with $('document').ready() function you show clear HTML without hiding the question, and when the document is loaded, after the document is loaded you hide the line/question.

DenisChenu

DenisChenu

2012-10-23 09:36

developer   ~21552

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

DenisChenu

DenisChenu

2012-10-23 16:44

developer   ~21563

Reminder sent to: TMSWhite

Can you look if actual version seems better ?

TMSWhite

TMSWhite

2012-10-23 19:37

reporter   ~21572

Denis-

you fixed it, thanks.

c_schmitz

c_schmitz

2012-10-24 14:16

administrator   ~21604

LimeSurvey 2.00+ Build 121024 released. Please update.

Related Changesets

LimeSurvey: master 21163e3e

2012-10-23 00:35:06

DenisChenu

Details Diff
Fixed issue 05907: User first see filtered question, hidden after by javascript
Dev: only fix first part of bugs
Dev: tested ls2_validation_tests.lss in 2.0 : betwwen 1 and 2 s to load, same think for 1.92.
Affected Issues
05907
mod - application/helpers/qanda_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-03-14 03:39 TMSWhite New Issue
2012-03-15 01:53 c_schmitz Assigned To => TMSWhite
2012-03-15 01:53 c_schmitz Status new => assigned
2012-04-11 17:55 TMSWhite Project Bug reports => Development
2012-10-16 21:11 TMSWhite Project Development => Bug reports
2012-10-16 21:11 TMSWhite Category Survey taking => Other issues
2012-10-16 21:12 TMSWhite Note Added: 21389
2012-10-16 21:13 TMSWhite Assigned To TMSWhite =>
2012-10-16 21:13 TMSWhite Status assigned => new
2012-10-18 10:57 DenisChenu Note Added: 21425
2012-10-18 10:58 DenisChenu File Added: checkRelevanceStatus.php
2012-10-18 12:16 DenisChenu Note Added: 21430
2012-10-23 00:31 DenisChenu Assigned To => c_schmitz
2012-10-23 00:31 DenisChenu Status new => assigned
2012-10-23 00:37 DenisChenu Note Added: 21547
2012-10-23 00:39 DenisChenu Note Added: 21548
2012-10-23 09:36 DenisChenu Changeset attached => LimeSurvey master 21163e3e
2012-10-23 09:36 DenisChenu Note Added: 21552
2012-10-23 09:36 DenisChenu Assigned To c_schmitz => DenisChenu
2012-10-23 09:36 DenisChenu Resolution open => fixed
2012-10-23 16:44 DenisChenu Note Added: 21563
2012-10-23 19:37 TMSWhite Note Added: 21572
2012-10-24 10:57 DenisChenu Status assigned => resolved
2012-10-24 10:57 DenisChenu Fixed in Version => 2.00+
2012-10-24 14:16 c_schmitz Note Added: 21604
2012-10-24 14:16 c_schmitz Status resolved => closed