#89147Media additionalConfig no-cookie attribute is added to video tags
Description
Description:
Typo3 version: 9.5.9
no-cookie attribute is added to
How to reproduce:
Add a media element using an mp4 video file.
Suspected cause:
The ‘no-cookie’ attribute is used for embedded youtube videos and is set via typoscript like this:
lib.contentElement.settings.media.additionalConfig.no-cookie = 1
which causes output like this:
<video controls no-cookie>...</video>
In the \TYPO3\CMS\Core\Resource\Rendering\VideoTagRenderer class we see that all values found in additionalConfig are added as attributes in addition to all values from additionalAttributes
if (isset($options['additionalConfig']) && is_array($options['additionalConfig'])) {
foreach ($options['additionalConfig'] as $key => $value) {
if ((bool)$value) {
$attributes[] = htmlspecialchars($key);
}
}
}
Possible solution:
The above lines could be removed entirely, as additionalAttributes are already available.
Reviews 3
History 616
-
Guido Schmechel commented <span data-processor="relativetime" data-value="2019-09-17T00:12:54+00:00" > 09/17/19, 00:12 </span>
-
Jarvis H commented <span data-processor="relativetime" data-value="2019-09-17T00:36:00+00:00" > 09/17/19, 00:36 </span>
Technically yes, it would be a breaking change, perhaps better suited for Typo3 v10.
I agree with your idea to remove the attributes as you suggested, temporarily solving it like that for Typo3 v9.
-
Gerrit Code Review pushed patch set 1 for master to change 61964 status
NewUnder Review <span data-processor="relativetime" data-value="2019-10-12T14:39:49+00:00" > 10/12/19, 14:39 </span> -
Gerrit Code Review pushed patch set 2 for master to change 61964 <span data-processor="relativetime" data-value="2019-10-26T13:52:26+00:00" > 10/26/19, 13:52 </span>
-
Gerrit Code Review pushed patch set 3 for master to change 61964 <span data-processor="relativetime" data-value="2019-10-31T00:08:13+00:00" > 10/31/19, 00:08 </span>
-
Gerrit Code Review pushed patch set 4 for master to change 61964 <span data-processor="relativetime" data-value="2020-05-25T20:42:16+00:00" > 05/25/20, 20:42 </span>
-
Mario Wilhelm commented and changed TYPO3 Version
911 PHP Version7.27.4 <span data-processor="relativetime" data-value="2021-10-22T13:53:39+00:00" > 10/22/21, 13:53 </span>If you have videos from mixed sources, e. g. youtube and mp4, then you need the no-cookie for youtube, but not for mp4.
Disabling it will cause youtube to www.youtube.com, and in mp4 everything is fine.
Enabling it shows a validation error for mp4, and in youtube everything is fine (www.youtube-nocookie.com).You have to test, if mp4 then no-cookie=0, if youtube then no-cookie=1
-
Felix Ranesberger commented <span data-processor="relativetime" data-value="2022-09-06T07:29:23+00:00" > 09/06/22, 07:29 </span>
We reset the configuration of FluidStyledContent again afterwards. YouTube videos are then loaded from https://www.youtube-nocookie.com and the videos no longer contain no-cookie attributes.
The original setting comes as far as I have seen from FluidStyledContent, can this option not simply be removed?
https://github.com/TYPO3-CMS/fluid_styled_content/blob/main/Configuration/TypoScript/Helper/ContentElement.typoscript#L38lib.contentElement.settings.media.additionalConfig.no-cookie >
-
Gerrit Code Review pushed patch set 1 for main to change 89166 <span data-processor="relativetime" data-value="2025-04-18T07:17:17+00:00" > 04/18/25, 07:17 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 89166 <span data-processor="relativetime" data-value="2025-04-18T08:33:23+00:00" > 04/18/25, 08:33 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 89166 <span data-processor="relativetime" data-value="2025-04-18T08:38:59+00:00" > 04/18/25, 08:38 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 89166 <span data-processor="relativetime" data-value="2025-04-18T08:44:16+00:00" > 04/18/25, 08:44 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 89166 <span data-processor="relativetime" data-value="2025-04-18T10:03:45+00:00" > 04/18/25, 10:03 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 89203 <span data-processor="relativetime" data-value="2025-04-23T11:59:31+00:00" > 04/23/25, 11:59 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-04-23T12:50:09+00:00" > 04/23/25, 12:50 </span>Applied in changeset commit:7432e7a92daa872edaa3a4f53f92c2550974ac8e.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:36:45+00:00" > 12/02/25, 14:36 </span>
The same problem exists with the new “api” setting in the master.
The question is: Does anyone use the typoscript setting for special attributes? Then removing the entire query would be a breaking change.
My suggestion: We remove “no-cookie” and “api” from the array within the VideoTagRenderer.