Project

General

Profile

Actions

Bug #87784

closed

ClickEnlargeViewHelper causes error "Object of class FileReference could not be converted to string in TemplateService.php line 1441"

Added by Adrian Dymorz over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-02-25
Due date:
% Done:

0%

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

Description

I just upgraded a website from v8 LTS to v9 LTS (9.5.4). On the new version, I am using fluid styled content. I have been using CSS styled content before.

I added the following lines to the page ts constants to use a lightbox script:

styles.content.textmedia.linkWrap {
    lightboxEnabled = 1
    width = 1024m
    height = 768m
}

I added the following crop variants to page ts config:

TCEFORM.sys_file_reference.crop.config.cropVariants {
    default {
        title = Desktop
        selectedRatio = NaN
        allowedAspectRatios {
            NaN {
                title = Free
                value = 0.0
            }
            21:9 {
                title = 21:9
                value = 2.3333333
            }
            16:9 {
                title = 16:9
                value = 1.7777777
            }
            4:3 {
                title = 4:3
                value = 1.3333333
            }
            3:2 {
                title = 3:2
                value = 1.5
            }
            1:1 {
                title = 1:1
                value = 1
            }
        }
    }
    og_image {
        title = Open Graph Image
        selectedRatio = 1:1
        allowedAspectRatios {
            1:1 {
                title = 1:1
                value = 1
            }
        }
    }
    header {
        title = Header Image
        selectedRatio = 31:01
        allowedAspectRatios {
            31:01 {
                title = 31:10
                value = 3.1
            }
        }
    }
}

After adding these crop variants, I get the following error on rendering image content elements, which have the click enlarge check box enabled:

Core: Error handler (FE): PHP Catchable Fatal Error: Object of class TYPO3\CMS\Core\Resource\FileReference could not be converted to string in /home/some_path/www/typo3/sysext/core/Classes/TypoScript/TemplateService.php line 1441

I also added the stack trace.


Files

stack trace.txt (27 KB) stack trace.txt Adrian Dymorz, 2019-02-25 22:56

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #93345: Exception when image with 0 bytes is used for click enlarge New2021-01-22

Actions
Actions

Also available in: Atom PDF