Project

General

Profile

Actions

Bug #104719

open

call to missing method ProcessedFile::process

Added by Franz Holzinger about 2 months ago. Updated 21 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2024-08-23
Due date:
% Done:

0%

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

Description

The front end leads to a PHP error message:

Call to undefined method TYPO3\CMS\Core\Resource\ProcessedFile::process()
in /home/path/typo3_src-13.2.1/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 940

if ($altUrl) {
$url = $altUrl . (($conf['JSwindow.']['altUrl_noDefaultParams'] ?? false) ? '' : '?file=' . rawurlencode((string)$imageFile) . $params);
}
$processedFile = $file->process(ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $conf);
$JSwindowExpand = $this->stdWrapValue('expand', $conf['JSwindow.'] ?? []);
$offset = GeneralUtility::intExplode(',', $JSwindowExpand . ',');
$newWindow = $this->stdWrapValue('newWindow', $conf['JSwindow.'] ?? []);
$params = [

It is this call:

$processedFile = $file->process(ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $conf);

Call backtrace:

in /path/typo3_src-13.2.1/typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php line 109

if ($linkWrap !== '') {
$theValue = $this->linkWrap($theValue, $linkWrap);
} elseif ($conf['imageLinkWrap'] ?? false) {
$originalFile = urldecode($imageResource->getFullPath());
$theValue = $this->cObj->imageLinkWrap($theValue, $originalFile, $conf['imageLinkWrap.']);

Files

debug-104719.html (245 KB) debug-104719.html Franz Holzinger, 2024-08-24 06:44
TYPO3 Exception-104719.html (1.02 MB) TYPO3 Exception-104719.html full backtrace HTML file Franz Holzinger, 2024-08-24 19:13
TestImage.typoscript (1.12 KB) TestImage.typoscript Helper TypoScript Franz Holzinger, 2024-09-06 10:37
Actions #1

Updated by Garvin Hicking about 2 months ago

  • Category set to Content Rendering
  • Status changed from New to Needs Feedback

Please provide the full stacktrace and especially what kind of image you use/pass here (I guess via typoscript?) and details like if it is a remote or local file.
Thank you!

Actions #2

Updated by Franz Holzinger about 2 months ago

add debug file

file.
Array
maxW 100
maxH 200
imageLinkWrap 1
imageLinkWrap.
Array
enable 1
bodyTag <body bgColor="black" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
wrap <a href="javascript:close();"> | </a>
width 800
height
JSwindow 1
JSwindow.
Array
newWindow 1
expand 0,0
$imageConfStart Pos 1

Actions #3

Updated by Garvin Hicking about 2 months ago

(My point is I need steps to reproduce in a plain TYPO3 installation without extra extensions, and the backtrace, not only debug output. It looks to me as if you pass an already processed file into your processing, but processed files cannot be processed again)

Actions #4

Updated by Franz Holzinger about 2 months ago ยท Edited

full backtrace

There is no change since TYPO3 12, where it works.

Actions #5

Updated by Garvin Hicking about 2 months ago

Could you please give a minimal reproducible example of code on how to reproduce this, without extra extensions being involved? Thank you!

Actions #6

Updated by Franz Holzinger about 1 month ago

Example Setup for IMAGE.
It uses a file "file = fileadmin/imagefilename.jpg". You must add some image there for reproducing this error.

    <div style="background-color: blue; padding: 0.5em 1em;">
        <dl>
            <dt>IMAGE file</dt>
            <dd>
                <f:cObject typoscriptObjectPath="lib.testImage" />
            </dd>
        </dl>
    </div>

The error happens when imageLinkWrap is part of the IMAGE.
ContentObjectRenderer.php line 940

$processedFile = $file->process(ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $conf);
Actions #7

Updated by Gerrit Code Review 21 days ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86194

Actions #8

Updated by Garvin Hicking 21 days ago

Thank you Franz, with your snippet it was really easy for me to reproduce this, and I believe to have found the issue (with the help of #typo3-cms and especially Mathias Brodala ;)).

Please check out the patch if that works for you?

Actions

Also available in: Atom PDF