#95714Omit attributes with blank values for additionalAttributes in VideoTagRenderer
Description
VideoTagRenderer.php implodes attributes with $dontOmitBlankAttribs = true.
$attributes[] = GeneralUtility::implodeAttributes($options['additionalAttributes'], true, true);
This could create problems like in this use case:
Example:
<f:media ... additionalAttributes="{poster: '{v:media.exists(file: \'fileadmin/test.jpg\', then: \'/fileadmin/test.jpg\')}', no-cookie: 1, relatedVideos: 0, color: 'white', playsinline: '1'}" />
In this case, AFAIK, it’s not possible to omit the attribute ‘poster’ in Fluid. So, if file doesn’t exist the attribute will still be present with an empty value but the use case wants that if a poster is not available for the video then the attribute must not be present.
I don’t know if there are use cases that needs $dontOmitBlankAttribs = true but I think that it should be false.
Reviews 3
Related issues 2
History 412
-
Oliver Hader changed Related to #81741 <span data-processor="relativetime" data-value="2021-10-20T13:28:24+00:00" > 10/20/21, 13:28 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 84625 status
NewUnder Review <span data-processor="relativetime" data-value="2024-06-11T18:50:14+00:00" > 06/11/24, 18:50 </span> -
Gerrit Code Review pushed patch set 2 for main to change 84625 <span data-processor="relativetime" data-value="2024-06-11T18:57:31+00:00" > 06/11/24, 18:57 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 84625 <span data-processor="relativetime" data-value="2024-10-18T13:36:42+00:00" > 10/18/24, 13:36 </span>
-
Benni Mack changed Related to #102392 <span data-processor="relativetime" data-value="2025-04-11T22:20:17+00:00" > 04/11/25, 22:20 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 84625 <span data-processor="relativetime" data-value="2026-04-22T06:50:50+00:00" > 04/22/26, 06:50 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 84625 <span data-processor="relativetime" data-value="2026-09-03T18:17:27+00:00" > 09/03/26, 18:17 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95628 <span data-processor="relativetime" data-value="2026-09-04T06:48:42+00:00" > 09/04/26, 06:48 </span>
-
Gerrit Code Review pushed patch set 6 for main to change 84625 <span data-processor="relativetime" data-value="2026-09-04T06:49:46+00:00" > 09/04/26, 06:49 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 95628 <span data-processor="relativetime" data-value="2026-09-04T06:49:58+00:00" > 09/04/26, 06:49 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-04T07:55:10+00:00" > 09/04/26, 07:55 </span>Applied in changeset commit:f6d7f90c0c7a8d3e94a19c73596c7de3ee456519.
Introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/53488/, issue #81741
(it probably affects some more classes, not only
VideoTagRenderer)