Moving Surveys between surveys loses Conditions?

More
5 years 7 months ago #75141 by tacman1123
tacman1123 created the topic: Moving Surveys between surveys loses Conditions?
My workflow is to develop on a local machine first, then export the final survey to a live site.

I just spent a bunch of time creating a survey with a lot of conditional groups and questions. I exported it to a .lss file, but when I import it, I lose all the conditions.

I'm guessing that although the conditions can be written in EM as things like ((attendee_count > 0)), it gets mapped to the crazy SGQA index, and then lost because that variable is now irrelevant.

Is my logic correct? Are conditions lost when you move surveys?

That doesn't make sense, though, because other surveys with conditions are shared between installations.

I'm using 1.92 RC4.

Tac

Please Log in to join the conversation.

More
5 years 7 months ago #75142 by TMSWhite
TMSWhite replied the topic: Moving Surveys between surveys loses Conditions?
Please open a private bug report about this and attach the survey so that we can try to reproduce and fix the issue.

Please Log in to join the conversation.

More
5 years 7 months ago #75143 by tacman1123
tacman1123 replied the topic: Moving Surveys between surveys loses Conditions?
False alarm. I think it was a configuration issue on the site it was moving to. Thanks!

Please Log in to join the conversation.

More
5 years 7 months ago #75164 by tacman1123
tacman1123 replied the topic: Moving Surveys between surveys loses Conditions?
The problem was that I moved it to a site that was set for embedded surveys ($embedded=true in config.php), so the JS was never being loaded, and the conditional questions were never hidden, so it looked like conditions weren't working.

So embedding a survey in a CMS is a site-wide setting? Shouldn't conditions also work even if it's embedded? I guess the include file should bring that js in, can someone point me to documentation or examples for how to do that?

I guess I'm surprised that it's site-wide, I can imagine situation where some surveys are embedded and others use one of them lime templates to display the survey, or certainly different surveys.


Thx,

Tac

Please Log in to join the conversation.

More
5 years 7 months ago #75165 by TMSWhite
TMSWhite replied the topic: Moving Surveys between surveys loses Conditions?
Tac-

The javascript that controls question visibility (e.g. conditions) is generated in-line in the HTML page. There should be functions checkconditions() which calls ExprMgr_...(), which call a bunch of LEMrelNNN() and LEMvalNNN() functions

Is that JavaScript not being generated when embedded?

If it is being generated, then something else is going on. We usually debug such situations with FireBug. Alternatively, if you can provide a link to such a problem survey, we can take a look.

/Tom

Please Log in to join the conversation.

More
5 years 7 months ago #75166 by tacman1123
tacman1123 replied the topic: Moving Surveys between surveys loses Conditions?
Can I send you links via a PM or email -- the survey isn't public yet? Or I can send the .lss file and you can import it into a site that's configured with $embedded=true.

I can be reached at tacman at gmail.

Thx,

Tac

Please Log in to join the conversation.

More
5 years 7 months ago #75168 by tacman1123
tacman1123 replied the topic: Moving Surveys between surveys loses Conditions?
I added the following lines to config.php, to allow testing more easily:
$embedded = empty($_REQUEST['embedded']) ? false : $_REQUEST['embedded'];
$embedded_inc = '';             // path to a php file to include

And definitely if I add &embedded=1 in the url the conditional questions stop working.

Please Log in to join the conversation.

More
5 years 7 months ago #75224 by Mazi
Mazi replied the topic: Moving Surveys between surveys loses Conditions?

tacman1123 wrote: I added the following lines to config.php, to allow testing more easily:

$embedded = empty($_REQUEST['embedded']) ? false : $_REQUEST['embedded'];
$embedded_inc = '';             // path to a php file to include

And definitely if I add &embedded=1 in the url the conditional questions stop working.

Please test if the problem still exists at the latest release . If so please open a ticket at the bugtracker and...
  1. Give as much information as possible
  2. Attach your survey. You can mark your ticket "private" so that only the developers will be able to take a look at it.
  3. Provide step-by-step instructions how to reproduce the problem.
  4. If possible/helpful please provide screenshots

Afterwards please post the link to the bugtracker so we can follow the progress.

Thanks!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 7 months ago #75228 by tacman1123
tacman1123 replied the topic: Moving Surveys between surveys loses Conditions?
The problem was actually that the server I moved it to was on RC5, the survey was developed on RC4, and there was a change in when group relevance was checked. TMSWhite fixed the problem last night.

So it was unrelated to embedding.

Tac

Please Log in to join the conversation.

More
5 years 7 months ago #75244 by Mazi
Mazi replied the topic: Moving Surveys between surveys loses Conditions?
Thanks for your feedback.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now