Project

General

Profile

Actions

Bug #93827

closed

MP4 file in page media causes error

Added by Christian von Holten about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-03-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

sample_640x360.mp4 (561 KB) sample_640x360.mp4 Riccardo De Contardi, 2021-03-31 08:34
Actions #1

Updated by Daniel Siepmann about 3 years ago

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.

Actions #2

Updated by Riccardo De Contardi about 3 years ago

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.

Actions #3

Updated by Georg Ringer about 3 years ago

  • Status changed from New to Needs Feedback
Actions #4

Updated by Christian von Holten about 3 years ago

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

Actions #5

Updated by Daniel Siepmann about 3 years ago

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.

Actions #6

Updated by Christian von Holten about 3 years ago

The Problem occurs on any TYPO3. I have tried a clean fresh installtion, without any special fluid rendering

Actions #7

Updated by Christian von Holten about 3 years ago

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

Actions #8

Updated by Daniel Siepmann about 3 years ago

  • Status changed from Needs Feedback to Resolved
Actions #9

Updated by Riccardo De Contardi about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF