Add "youtube" to the iframe_types ("ce_youtube" becomes "youtube" since Contao 5.13)
Closed this issue · 11 comments
Prerequisites
- I checked for duplicate issues (open and closed)
- I am using the latest stable version/release of the Contao Cookiebar
- This issue is not a question, not a feature request and I have read the documentation and pinned issues
Please select the topic(s) that most closely match your concern
Backend (PHP)
Description
In Contao 5.13 a YouTube element only gets blocked when adding - youtube
to the iframe_types
in the parameters.yaml. This is because the content elements have been renamed, here ce_youtube
to (content_elements/) youtube
. I suggest to add this as default.
Relevant log output
No response
I tested it this night with Contao 5.3.11 and Contao Cookiebar 2.0.2. It didn't work (for me) until I added - youtube
to the parameters.yaml. If I remove it, the YouTube video is loading, even without accepting the cookie consent.
Maybe it's an error on my side. I just wanted to report it if not.
Why is it in the parameters.yaml in the first place?
How does your config.yaml look like?
Rather, we are using the Cookiebar in the same version under 5.3.11 and youtube is being blocked without changing the configuration after all
It's the only way I could get it to work.
https://pastebin.com/1gQC2FUh
What happens if you drop all configuration you have stored in the parameters.yaml regarding the cookiebar?
This also shouldn't be saved in the parameters.yaml at all, that's what you use the config.yaml for.
You also have improper spacing in your yaml file.
Either use 4 or 2, not both.
@Funbug are you using any custom templates and what happens if you remove the content-youtube from here:
# config.yaml
contao_cookiebar:
consider_dnt: true
anonymize_ip: true
consent_log: false
iframe_types:
youtube:
- youtube
- ce_youtube
or did you just add it because it's the class name?
I don't use custom templates and no extensions except this one. I don't need "content-youtube", right. That was just an attempt. Forget that. It doesn't change the behaviour though.
When i drop all cookiebar related lines (and after reloading the prod-cache of course) the video is loading without consent, just as without "- youtube".
Until now, I've never hat a config.yaml. :D Does it make any difference?
@Funbug I wonder... did you activate the cookiebar in the root page?
Did you configure it in the backend?
And did you add a cookietype of iframe -> youtube in the cookiebar?
And to be clear, adding youtube
fixes it for you, right?
(I'll add it in the next release since it also affects Elements that were rendered using the ContentProxy)
Yes, yes, yes and yes. :)
I’m happy to test the new release when it’s out.
2.1.0 works for me without adding something to the config/parameters.yaml. Thank you. ❤️