Project

General

Profile

Actions

Bug #104719

closed

call to missing method ProcessedFile::process

Added by Franz Holzinger 3 months ago. Updated 30 days ago.

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

100%

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 3 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 3 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 3 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 3 months ago ยท Edited

full backtrace

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

Actions #5

Updated by Garvin Hicking 3 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 3 months 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 2 months 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 2 months 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 #9

Updated by Gerrit Code Review about 1 month ago

Patch set 2 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 #10

Updated by Gerrit Code Review about 1 month ago

Patch set 3 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 #11

Updated by Gerrit Code Review about 1 month ago

Patch set 4 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 #12

Updated by Gerrit Code Review 30 days ago

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

Actions #13

Updated by Gerrit Code Review 30 days ago

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

Actions #14

Updated by Garvin Hicking 30 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF