Bug #87529
closedAbstractOEmbedHelper::transformMediaIdToFile() must check if $oEmbed['title'] is set before using it.
100%
Description
This bug is one of the two little sidekicks of https://forge.typo3.org/issues/87528.
In TYPO3 8 AND 9, \TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\AbstractOEmbedHelper::transformMediaIdToFile()
contains the following passage:
$oEmbed = $this->getOEmbedData($mediaId); if (!empty($oEmbed)) { $fileName = $oEmbed['title'] . '.' . $fileExtension; } else { $fileName = $mediaId . '.' . $fileExtension; }
Under some circumstances, $oEmbed['title']
is not set - for example for privacy-restricted Vimeo videos due to a missing Referer header; but that's a separate bug: https://forge.typo3.org/issues/87528 . Despite what's in #87528, still testing for !empty($oEmbed)
and using $oEmbed['title']
is a logical fault. :) So one bug must be fixed independently from the other.
When $oEmbed['title']
is not set, the file will be saved successfully, but as a hidden file, due to its filename ".vimeo". All further retries fail, because TYPO3 (actually the local driver) "knows" the file is there and acts accordingly, but does not show the file to the user due to the filterHiddenFilesAndFolders
default filter.
Therefore, when $oEmbed['title']
is not set then $fileName = $mediaId . '.' . $fileExtension;
must be used.
Updated by Gerrit Code Review over 5 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/+/59878
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59900
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 95ea7021c181ea376143bb50aaf79f53b0232977.
Updated by Georg Ringer over 4 years ago
- Has duplicate Bug #90860: Private vimeo videos are stored as ".vimeo" in the file list added