Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Question's unstability in several surveys

  • RomTav
  • RomTav's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 months ago #226524 by RomTav
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.2.5
Own server or LimeSurvey hosting: LimeSurvey hosting
Theme: skelvanilla


==================

Hello, 
My team and I encounter a big issue while using several surveys on Lime Survey: questions are unstable and randomly change, even when we are not using the survey itself. 

Exemple of change: 
  • The label of a question is replaced by the label of another question
  • The label of a line in an array is replaced by the label of another question
Here is an exemple of error we have seen, within a survey in both german and french language: 
 

Important: every times it happens, the old label is replaced by a new one from a question label with an ExpressionScript. 

Is there a way to prevent these random changes? Are ExpressionScript unstable and need to be avoid? 

Thanks in advance ! 

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #226530 by tpartner
Replied by tpartner on topic Question's unstability in several surveys
ExpressionScript is very stable.

You are paying LimeSurvey GmbH for hosting so...

1) Try using a core theme.

2) If the problem persists, contact LimeSurvey support directly.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 2 months ago #226540 by DenisChenu
Replied by DenisChenu on topic Question's unstability in several surveys
And clearly : i don't see why it can happen with SkelVanilla ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #226552 by tpartner
Replied by tpartner on topic Question's unstability in several surveys
That was not a statement about the GREAT SkelVanilla theme. Just checking all of the boxes. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 2 months ago #226566 by DenisChenu
Replied by DenisChenu on topic Question's unstability in several surveys

That was not a statement about the GREAT SkelVanilla theme. Just checking all of the boxes. :)
 
Contacted via support email ;)

Else : www.limesurvey.org/manual/Check_data_integrity

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.

Please Log in to join the conversation.

  • RomTav
  • RomTav's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 months ago - 3 years 2 months ago #226650 by RomTav
Replied by RomTav on topic Question's unstability in several surveys
Hello,

Thanks for your answers. We tried to use another theme (Vanilla) and to correct all error message from “check data integrity”, but the issue is still persistent. Thus, it does not seem to occur due to the theme or data integrity.


Every time a question is move to another one, the new text that replace the old one is from a question with an ExpressionScript. We thus wonder if we misused it or if ExpressionScript are unstable.


The ExpressionScripts we use in this survey are often of this type (check of the participant age) :

<span class="custom-warnings" style="color:#c0392b;">{if((V5Q2tab_V5Q2 == 9) && (regexMatch('/^([1-9]|10)$/', V118a_other) || (is_empty(V118a_other))),"", if((V5Q2tab_V5Q2 == 8) && (regexMatch('/^([1-9]|[1][0-1])$/', V118a_other) || (is_empty(V118a_other))),"", if((V5Q2tab_V5Q2 == 1) && (regexMatch('/^([1-9]|[1][0-8])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 2) && (regexMatch('/^([1-9]|[1][0-7])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 3) && (regexMatch('/^([1-9]|[1][0-6])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 4) && (regexMatch('/^([1-9]|[1][0-5])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 5) && (regexMatch('/^([1-9]|[1][0-4])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 6) && (regexMatch('/^([1-9]|[1][0-3])$/', V118a_other) || (is_empty(V118a_other))),"",if((V5Q2tab_V5Q2 == 7) && (regexMatch('/^([1-9]|[1][0-2])$/', V118a_other) || (is_empty(V118a_other))),"",if(is_empty(V5Q2tab_V5Q2) && (regexMatch('/^([1-9]|[1][0-8])$/', V118a_other) || (is_empty(V118a_other))),"","Merci d'entrer un âge inférieur ou égal au tien"))))))))))}</span>

In this code the variable are:
  • V5Q2tab_V5Q2 : year of birth from 2004 to 2012 (coded 1 to 9)
  • V118a_other : age at the event X


And the custom.css code associated with the new class “custom-warnings” is:.custom-warnings{
    font-family: Verdana, sans-serif;
    font-size:14px;
    font-weight:bold;
}



The only code in custom.js is the following: 

$(document).ready(function() {
    $(document).find("input:checked[type='radio']").addClass('bounce');   
    $("input[type='radio']").click(function() {
        $(this).prop('checked', false);
        $(this).toggleClass('bounce');

        if( $(this).hasClass('bounce') ) {
            $(this).prop('checked', true);
            $(document).find("input:not(:checked)[type='radio']").removeClass('bounce');
        }
    });
});


Of note, all the ExpressionScript we use have the class “custom-warnings”.If it is of any help, here is a list of option we use in the survey: 
  • Conditions (hide or not a question based on user answer)
  • ExpressionScript (show a message if answers seem incoherent)
  • Custom.css and custom.js in the theme code
  • Survey in two langage (german and french)
  • Several survey with same question group

Thanks in advance for your help 
Last edit: 3 years 2 months ago by RomTav.

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #226651 by tpartner
Replied by tpartner on topic Question's unstability in several surveys
As I said, you are a paying customer, if you have a problem you can contact LS support directly - account.limesurvey.org/customer-support

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 months ago #226658 by Joffm
Replied by Joffm on topic Question's unstability in several surveys
Can't you shorten your equation to something like

{if((intval(V118a_other) le (19-V5Q2tab_V5Q2)) OR is_empty(V118a_other),"","Merci d'entrer un âge inférieur ou égal au tien")}

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose