FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 228 forks source link

v:media.video unknown type "" #1815

Open timofo opened 1 year ago

timofo commented 1 year ago

Hello,

with TYPO3 11.5.19 and vhs 6.1.2, i determine an error with v:media.video I get the error unknown type ""

In file /Classes/ViewHelpers/Media/VideoViewHelper.php in line 135 you have to make following change to make it work.

$src = mb_substr(GeneralUtility::getFileAbsFileName(ltrim($source,"/")), mb_strlen(CoreUtility::getSitePath()));

Original line:

$src = mb_substr(GeneralUtility::getFileAbsFileName($source), mb_strlen(CoreUtility::getSitePath()));

You have to remove the leading "/" in the source string. On the other hand, you get an empty string from getFileAbsFileName and the type is "" (empty)