Actions
Bug #94357
closedVimeoRenderer generates wrong urls for vimeo events.
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-06-16
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
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!
Actions