#93827MP4 file in page media causes error
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 1
History 9
-
Daniel Siepmann commented 03/31/21, 08:27
-
Riccardo De Contardi commented and changed attached sample_640x360.mp4 03/31/21, 08:35
I am so far not able to reproduce this issue on fresh TYPO3 installations
tested:
9.5.26
10.4.14I used the attached file and “Text and Media” Content element.
-
Georg Ringer changed status
NewNeeds Feedback 04/01/21, 19:43 -
Christian von Holten commented 04/06/21, 07:27
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
-
Daniel Siepmann commented 04/12/21, 05:51
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. -
Christian von Holten commented 04/14/21, 09:52
The Problem occurs on any TYPO3. I have tried a clean fresh installtion, without any special fluid rendering
-
Christian von Holten commented 04/15/21, 07:32
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
-
Daniel Siepmann changed status
Needs FeedbackResolved 04/15/21, 07:35 -
Riccardo De Contardi changed status
ResolvedClosed 04/15/21, 07:39
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.