Condition on question in group by group visualization doesn't work

More
3 years 9 months ago - 3 years 9 months ago #99285 by AndrzejKisiel
AndrzejKisiel created the topic: Condition on question in group by group visualization doesn't work
Hi,
I have this problem that is similar to:
https://www.limesurvey.org/en/forum/design-issues/66204-condition-on-question-in-group-by-group-visualization-doesnt-work
but it supposed to be fixed now.

I created very simple survey where some questions within the same group should be displayed dynamically based on previous answers, but it doesn't work. All the questions are always displayed disregarding the conditions/relevance.

This is my survey logic:


This is what I get with group by group view:


The problem only occurs within one group (questions do not appear/disappear dynamically), because if I answer "No" for question G1Q1 in Group1 I go directly to Group3 question G3Q1 (Group2 is skipped, so its ok).

With question by question mode certainly everything is ok.
I don't know if it matters, but I noticed that "Previous" button doesn't work as well.
One more hint: if I go to Tools -> Expression Manager -> Unit Test Dynamic Relevance Processing then it works ok (questions are shown/hidden dynamically).

My LimeSurvey Version 2.00+ Build 130802. It was updated recently from 1.85+ (7253) where everything was ok.

Any idea what might be the problem (might it be PHP version or another component that is not up to date for 2.00+ release)?
:pinch:
Last Edit: 3 years 9 months ago by AndrzejKisiel. Reason: invalid screenshot links

Please Log in to join the conversation.

More
3 years 9 months ago #99286 by AndrzejKisiel
AndrzejKisiel replied the topic: Condition on question in group by group visualization doesn't work
PHP version is 5.2.6.dfsg.1-1+lenny3. All the installation checks were ok anyway.
I checked this survey in Firefox 17.0.1 and IE 8.0 - same problem.

Please Log in to join the conversation.

More
3 years 9 months ago #99287 by DenisChenu
DenisChenu replied the topic: Condition on question in group by group visualization doesn't work
Hi,

You have a javascript bug somwhere.

Better is to send us a link to test directly.

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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 9 months ago #99288 by AndrzejKisiel
AndrzejKisiel replied the topic: Condition on question in group by group visualization doesn't work
This is intranet server, so I cannot be publicly accessed. Should I check it via web developer tools in my web browser?

Please Log in to join the conversation.

More
3 years 9 months ago #99289 by AndrzejKisiel
AndrzejKisiel replied the topic: Condition on question in group by group visualization doesn't work
Ok, this is what I found .

When switching Yes/No radio button in the question G2Q1 "Do you want to see question G2Q2" following error is thrown on web browsers error console:

Time: 2013-08-23 15:13:18
Error: ReferenceError: $ is not defined
Source: konsolidator.nsn-intra.net/limesurvey/index.php/survey/index
Line: 104


Analysing page source it refers to this function:
function checkconditions(value, name, type, evt_type)
            {
                if (typeof evt_type === 'undefined')
                {
                    evt_type = 'onchange';
                }
                if (type == 'radio' || type == 'select-one')
                {
line 104 --->       $('#java'+name).val(value)
                }
                else if (type == 'checkbox')
                {
                    if ($('#answer'+name).is(':checked'))
                    {
                        $('#java'+name).val('Y');
                    } else
                    {
                        $('#java'+name).val('');
                    }
                }
                else if (type == 'text' && name.match(/other$/))
                {
                    $('#java'+name).val(value);
                }
Is it any helpful?

Please Log in to join the conversation.

More
3 years 9 months ago #99316 by DenisChenu
DenisChenu replied the topic: Condition on question in group by group visualization doesn't work
Hi,

Did you have {TEMPLATEJS} in your startpage.pstpl ?

Can you test with default template ?

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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 9 months ago - 3 years 9 months ago #99318 by AndrzejKisiel
AndrzejKisiel replied the topic: Condition on question in group by group visualization doesn't work
Hi Denis,

I exported template default (default is also used in my survey) and here is the content of startpage.pstpl file:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>{SURVEYNAME}</title>
		<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />
 
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}template.css" />
<!--[if lte IE 6]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<![endif]-->
<!--[if IE 7]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if IE 8]>
		<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_8.css" />
<![endif]-->
 
<!-- The following CSS hides visual elements of the progress bar from screen readers. -->
		<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
		</style>
 
		<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
 
</head>
<body class="default">
<table width="75%" align="center" class="outerframe">
	<tr>
		<td>

I cannot see {TEMPLATEJS} but this line:
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>

And the file template.js contains only two functions:
function focusFirst(Event)
function correctPNG()


Should it be the cause of my problem? How can I fix it?
Last Edit: 3 years 9 months ago by AndrzejKisiel. Reason: Added template.js info

Please Log in to join the conversation.

More
3 years 9 months ago #99319 by DenisChenu
DenisChenu replied the topic: Condition on question in group by group visualization doesn't work
Think there are a problem when you update the version.

1.85 to 2.0 is a big step.

1st : the default template HAVE {TEMPLATEJS} in startpage.pstpl. Look at ./template/default/startpage.pstpl. If you have a "default" template in your ./upload/templates : you have to delete it. github.com/LimeSurvey/LimeSurvey/blob/ma...ault/startpage.pstpl

2nd: replace the template.js line by {TEMPLATEJS}

3rd: there are more part to be updated in 1.85 to 2.0 (diffrence between 1.95 and 1.91) the start a new template with an inlcuded template is better.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: AndrzejKisiel

Please Log in to join the conversation.

More
3 years 9 months ago - 3 years 9 months ago #99324 by AndrzejKisiel
AndrzejKisiel replied the topic: Condition on question in group by group visualization doesn't work
I replaced whole ./template catalogue with files from the latest LimeSurvey release (as in your link).
Now everything is ok! :woohoo:

I have a suspicion that ./template catalogue was manually overwritten (by my colleague who was doing the installation) with old backup files after the installation of 2.0 version, so I am not going to report it as a bug.

Thank you so much for your prompt support Denis! LimeSurvey is a great project!
AndrzejK B)
Last Edit: 3 years 9 months ago by AndrzejKisiel. Reason: Icon changed to V

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now