- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Embedding for Youtube videos not working
- lpwevers
- Topic Author
- Offline
- New Member
Less
More
7 months 1 week ago #250507
by lpwevers
Embedding for Youtube videos not working was created by lpwevers
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 5.6.3+230130
Own server or LimeSurvey hosting: Own server
Survey theme/template: BootsWatch
==================
When creating questions, we want to embed Youtube videos. So we click on the "Insert a Youtube video" button and past the embed link for the video. After that, the only thing we get is a red "Remove Video" button:
The source code generated looks like this:
<div class="videodetector"><iframe frameborder="0" src=""></iframe><input class="remove-videodetector" type="button" value="Remove video" /></div>
<p>/</p>
Any ideas on how to fix this?
Kind regards,
Louis
Your LimeSurvey version: LimeSurvey Community Edition Version 5.6.3+230130
Own server or LimeSurvey hosting: Own server
Survey theme/template: BootsWatch
==================
When creating questions, we want to embed Youtube videos. So we click on the "Insert a Youtube video" button and past the embed link for the video. After that, the only thing we get is a red "Remove Video" button:
The source code generated looks like this:
<div class="videodetector"><iframe frameborder="0" src=""></iframe><input class="remove-videodetector" type="button" value="Remove video" /></div>
<p>/</p>
Any ideas on how to fix this?
Kind regards,
Louis
Please Log in to join the conversation.
- Matherion
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 2
7 months 5 days ago #250577
by Matherion
Replied by Matherion on topic Embedding for Youtube videos not working
I thought I'd add some comments here. It's a very weird error - we also run LS3, and that runs without problems (well, apart from not being up-to-date), but this otherwise fresh LS5 installation somehow removes URLs to videos. Once you saved a question, LimeSurvey strips the content of the question to:
Does anybody have any idea why LimeSurvey would consider this a good idea?
Code:
<div class="videodetector"> </div> <p> </p>
Does anybody have any idea why LimeSurvey would consider this a good idea?
Please Log in to join the conversation.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11660
- Thank you received: 2742
7 months 5 days ago - 7 months 5 days ago #250582
by holch
Most probably you told Limesurvey to do so, by activating the XSS filter.
Have a look if the XSS filter is on.
If the XSS filter is OFF and this still happens (and you are on the latest version of your Limesurvey branch) please create a bug report.
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 Embedding for Youtube videos not working
Does anybody have any idea why LimeSurvey would consider this a good idea?
Most probably you told Limesurvey to do so, by activating the XSS filter.
Have a look if the XSS filter is on.
If the XSS filter is OFF and this still happens (and you are on the latest version of your Limesurvey branch) please create a bug report.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 7 months 5 days ago by holch.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
7 months 5 days ago - 7 months 5 days ago #250583
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Embedding for Youtube videos not working
Hi,
1. Do not insert only this "src" into the LimeSurvey wizard, but enter the whole embed code from Youtube.
2. Do not use the HTML-Editor, but the "Source code editor". The HTML editor sometomes has its own ideas what to add to the code.
All done in the Cloud version 5.6.38.
To compare:
This is the result of the HTML-editor
Joffm
1. Do not insert only this "src" into the LimeSurvey wizard, but enter the whole embed code from Youtube.
2. Do not use the HTML-Editor, but the "Source code editor". The HTML editor sometomes has its own ideas what to add to the code.
All done in the Cloud version 5.6.38.
To compare:
This is the result of the HTML-editor
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 7 months 5 days ago by Joffm.
Please Log in to join the conversation.
- lpwevers
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
7 months 4 days ago #250605
by lpwevers
Replied by lpwevers on topic Embedding for Youtube videos not working
Hi,
Thanks for all the suggestions. I've now disabled the XSS filter but alas, that didn't seem to do anything in this regard. So using the source editor I pasted the full URL from Youtube; still no luck. But after having done that, I think I found the culprit. We had a pentest on our system and from the recommendations from that I had something like this in my Apache configuration:
After I commented out that line and restarted Apache, I could see the video in the question. To get that to work I indeed had to use the source editor as @Joffm suggested. Using the HTML editor still doesn't work.
Thanks for all the help.
Louis
Thanks for all the suggestions. I've now disabled the XSS filter but alas, that didn't seem to do anything in this regard. So using the source editor I pasted the full URL from Youtube; still no luck. But after having done that, I think I found the culprit. We had a pentest on our system and from the recommendations from that I had something like this in my Apache configuration:
Code:
Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'self'; frame-ancestors 'self'; upgrade-insecure-requests" "expr=%{CONTENT_TYPE} =~ m#text\/(html|javascript)|application\/pdf|xml#i"
After I commented out that line and restarted Apache, I could see the video in the question. To get that to work I indeed had to use the source editor as @Joffm suggested. Using the HTML editor still doesn't work.
Thanks for all the help.
Louis
Please Log in to join the conversation.
- mathieulorenzo
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
4 months 1 week ago #253463
by mathieulorenzo
Replied by mathieulorenzo on topic Embedding for Youtube videos not working
Hello,
I am encountering the same issue despite the explanations on the forum. I am on version 5.6.49.I disabled the CSS filters and used the embedded Youtube code in the source editor.
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" frameborder="0" height="315" sandbox="" scrolling="no" src=" www.youtube.com/embed/ xxxvideoIDxxx" title="YouTube video player" width="560"></iframe>
Would anyone have another idea?
I am encountering the same issue despite the explanations on the forum. I am on version 5.6.49.I disabled the CSS filters and used the embedded Youtube code in the source editor.
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="" frameborder="0" height="315" sandbox="" scrolling="no" src=" www.youtube.com/embed/ xxxvideoIDxxx" title="YouTube video player" width="560"></iframe>
Would anyone have another idea?
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
4 months 1 week ago - 4 months 1 week ago #253464
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Embedding for Youtube videos not working
Hi,
I do not see an issue (5.6.40)
But as said before: Use the source code editor, not the WYSIWYG editor
Joffm
I do not see an issue (5.6.40)
But as said before: Use the source code editor, not the WYSIWYG editor
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 months 1 week ago by Joffm.
Please Log in to join the conversation.