- Posts: 9
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Source gets deleted
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
7 years 6 months ago #143372
by cgebauer
Source gets deleted was created by cgebauer
Hello,
I created a survey with a script in one question (some answers are prefilled, e. g. see the attached file Question 1). On my Computer it all works fine.
But: When I import the survey to the server, the "source text" gets deleted. I am also not able to save scripts on the server. if i click save and then open it again it is just not there anymore.
I would very much appreciate any tips!
Thank you
I created a survey with a script in one question (some answers are prefilled, e. g. see the attached file Question 1). On my Computer it all works fine.
But: When I import the survey to the server, the "source text" gets deleted. I am also not able to save scripts on the server. if i click save and then open it again it is just not there anymore.
I would very much appreciate any tips!
Thank you
Attachments:
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 6 months ago #143373
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Source gets deleted
What do you exactly mean with "the source text gets deleted"? What source? Does it affect the whole survey or just this specific question?
How do you import the survey?
When you say "with a script", you have some kind of Javascript in the survey? Did you make sure that the use of Javascript is enabled on your server?
How do you import the survey?
When you say "with a script", you have some kind of Javascript in the survey? Did you make sure that the use of Javascript is enabled on your server?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 6 months ago #143374
by cgebauer
Replied by cgebauer on topic Source gets deleted
thank you for your quick answer!
I just click "source" then I enter this:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#answer132849X3X16SQ001-A1').trigger('click');
});
</script>
then I click save. After that that "code" is not there anymore when I click source again.
Also when I import the survey where it is also implemented, the code gets deleted and is not there in the new imported survey.
I don't know if java-script is enabled. How can i check that?
Thanks for you help!
I just click "source" then I enter this:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#answer132849X3X16SQ001-A1').trigger('click');
});
</script>
then I click save. After that that "code" is not there anymore when I click source again.
Also when I import the survey where it is also implemented, the code gets deleted and is not there in the new imported survey.
I don't know if java-script is enabled. How can i check that?
Thanks for you help!
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 6 months ago #143377
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Source gets deleted
You would find a pretty good description of that in the manual:
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
Also, it is always recommendable to mention which version of LS you are working with. Otherwise it can be difficult to help you, because the solutions / issues might be totally different on different versions of LS.
Also, it is always recommendable to mention which version of LS you are working with. Otherwise it can be difficult to help you, because the solutions / issues might be totally different on different versions of LS.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 6 months ago #143378
by cgebauer
Replied by cgebauer on topic Source gets deleted
My Version: 2.54.2+161012
That's exactly what I did, but the script does not save.
That's exactly what I did, but the script does not save.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 6 months ago #143381
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Source gets deleted
Would have been great to mention in which question the JS should be. So I had to go through each question. At least until Q3...
I imported your lss and everything looks fine:
Tested with LS 2.54.4+ 161018
What version is your local installation and what version is installed on your server? Maybe there has been a problem in a version between those two?
If not: Something strange is going on on your server.
I imported your lss and everything looks fine:
Tested with LS 2.54.4+ 161018
What version is your local installation and what version is installed on your server? Maybe there has been a problem in a version between those two?
If not: Something strange is going on on your server.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Attachments:
The topic has been locked.
- cgebauer
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
7 years 6 months ago #143383
by cgebauer
Replied by cgebauer on topic Source gets deleted
My Version: Version 2.54.2+161012
Server Version: Version 2.54.3
But the thing is I am not able to save the script on the server. I paste, save, click source again. And it is gone ..
Server Version: Version 2.54.3
But the thing is I am not able to save the script on the server. I paste, save, click source again. And it is gone ..
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 6 months ago #143385
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Source gets deleted
Well, this doesn't exclude the chance that there has been a bug in 2.54.3 that isn't there in 2.54.2 and 2.54.4.
Solutions:
1. check bug fixes
2. update and see if the problem persists
If problem on the server persists after updating, then you have something strange going on on your server setup.
Solutions:
1. check bug fixes
2. update and see if the problem persists
If problem on the server persists after updating, then you have something strange going on on your server setup.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 6 months ago #143404
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Source gets deleted
Sounds like the XSS filter is enabled.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 years 6 months ago #143408
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Source gets deleted
That is what I thought, but then he says he did exactly what was in my link here:
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
It clearly states:
manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
It clearly states:
So either he did NOT exactly "that" or there is something else.Go to Global settings --> Security and set "Filter HTML for XSS" to "Off".
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Deusdeorum
- Offline
- Senior Member
Less
More
- Posts: 72
- Thank you received: 17
7 years 6 months ago - 7 years 6 months ago #143427
by Deusdeorum
Replied by Deusdeorum on topic Source gets deleted
I asked him to do what it says in that link but he claims it didn't work.
By the way, olle and i helped him with that trigger script to pre select an option. However, that will most likely trigger that option again if a user uses the back button, is it possible to somehow only fire a trigger function once?
By the way, olle and i helped him with that trigger script to pre select an option. However, that will most likely trigger that option again if a user uses the back button, is it possible to somehow only fire a trigger function once?
Last edit: 7 years 6 months ago by Deusdeorum.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
7 years 6 months ago #143428
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Source gets deleted
It looks like you are clicking a radio in an array of some sort. Without knowing the details, I would say you should check to see if there are any checked radios in that row before firing the click trigger.However, that will most likely trigger that option again if a user uses the back button, is it possible to somehow only fire a trigger function once?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.