Bug #93827
closed
MP4 file in page media causes error
Added by Christian von Holten about 3 years ago.
Updated about 3 years ago.
Category:
Content Rendering
Description
Hello,
if I create a file relation in page media and choose a mp4 file TYPO3 throws following exception:
PHP Catchable Fatal Error: Object of class Rs\Indivumed\Resource\RsFileReference could not be converted to string in /html/typo3_sources/typo3_src-9.5.26/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 4765
it´s reproducable in 9.5.26 and 10.4.13.
Am I the first one who tried to use mp4 file in that field. I could not imagine
Files
Looks like some custom extension and code is involved (Rs\Indivumed).
Can you provide more information? The complete stack trace?
I don't think this is an issue with TYPO3 itself, but with the extension in use.
I am so far not able to reproduce this issue on fresh TYPO3 installations
tested:
9.5.26
10.4.14
I used the attached file and "Text and Media" Content element.
- Status changed from New to Needs Feedback
Hello,
it´s not a problem of a extension. Same error occurs on just using typo3 core.
Object of class TYPO3\CMS\Core\Resource\FileReference could not be converted to string
in /usr/www/users/rsndev/typo3_sources/typo3_src-10.4.13/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 4454
And the error is not in text medie content elemenet. It occurs in Page-->Resources-->Media. And another strange behaviour: if first reference is a jpg and the second is a mp4 the error is gone. So it happens only if you place just one mp4 reference.
Hopefully someone is able to reproduce
I'm not aware of any place where TYPO3 outputs the pages.media field by default. It has to be something specific to your setup.
Can you share the corresponding Fluid part?
Probably the reference is used wrong.
The Problem occurs on any TYPO3. I have tried a clean fresh installtion, without any special fluid rendering
I found the problem. I have used this old code, which is obsolete, because opengraph-tags are already configured in seo-extension:
og:image {
attribute = property
stdWrap.cObject = FILES
stdWrap.cObject {
references {
data = levelfield:-1, media, slide
}
maxItems = 1
renderObj = COA
renderObj {
10 = IMG_RESOURCE
10 {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 1280c
height = 720c
}
stdWrap {
typolink {
parameter.data = TSFE:lastImgResourceInfo|3
returnLast = url
forceAbsoluteUrl = 1
}
}
}
}
}
}
So bug status could be changed to solved
- Status changed from Needs Feedback to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF