Bug #94357
closedVimeoRenderer generates wrong urls for vimeo events.
100%
Description
Steps to reproduce:
- Create a "Text and media" content element.
- Add media by url. Use a vimeo event url in the format https://vimeo.com/event/1234567.
- Save the element.
- Render the file reference using the <f:media> view helper (should be the default, when using fluid_styled_content).
Result: The <f:media> view helper uses TYPO3\CMS\Core\Resource\Rendering\VimeoRenderer to render an iframe, but the method createVimeoUrl generates a wrong url. The url is https://player.vimeo.com/video/event/1234567, but it should be https://vimeo.com/1234567/embed instead. The reason for that is, that the variable videoId contains "1234567" for a normal video, but "event/1234567" for an event. So, this can be fixed easily:
Replace
return sprintf('https://player.vimeo.com/video/%s?%s', $videoId, implode('&', $urlParams));
with
if (strpos($videoId, 'event/') !== false) {
return sprintf('https://vimeo.com/%s/embed?%s', $videoId, implode('&', $urlParams));
} else {
return sprintf('https://player.vimeo.com/video/%s?%s', $videoId, implode('&', $urlParams));
}
Thanks in advance for fixing!
Updated by Guido Schmechel over 3 years ago
The fix should go quite well. How does this URL come about? How could one test a fix cleanly? The event linked above is gone.
Updated by Kai Strecker over 3 years ago
This wasn't a real url, it was just a dummy.
You can use a url from one of our customers. The vimeo event is embedded here: https://www.seehasenfest.de/ . The url you set in TYPO3 is https://vimeo.com/event/1068996.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69953
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70552
Updated by Guido Schmechel over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2b4713cae784f1967d7d30c3f16c3bb9df5bb3bf.