Project

General

Profile

Actions

Bug #70037

closed

Obsolete construct Parameter in DatabaseQueryProcessor breaks Frontend

Added by Sebastian Seidelmann over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2015-09-23
Due date:
% Done:

100%

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

Description

Hi everbody. The Problem is, that there is a missing argument for the __construct Method in TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor. Here are the two "fast" solutions:

- Add the Parameter to the makeInstance call in TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor (l 58) > GeneralUtility::makeInstance($className, $cObject). Not a nice solution, but its working :simple_smile:
Remove the Parameter from the TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor::__construct. Obviously the Content Object Renderer instance isn't used in the whole class, so it's not needed. Furthermore the other Dataprocessors haven't a __construct yet, so the target should be to implement the __construct in TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface, so there can't be a failure with wrong API usage.

If the Content Object Renderer Instance is needed to a further step, just implement the parameter in every __construct Method in all of the content processors.

#1: PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor::__construct() must be an instance of TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer, none given, called in /vagrant/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4342 and defined in /vagrant/typo3_src/typo3/sysext/frontend/Classes/DataProcessing/DatabaseQueryProcessor.php line 56
Actions #1

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43499

Actions #2

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43499

Actions #3

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43499

Actions #4

Updated by Sebastian Seidelmann over 8 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF