Bug #70037
closedObsolete construct Parameter in DatabaseQueryProcessor breaks Frontend
100%
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
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
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
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
Updated by Sebastian Seidelmann over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset dfea1ce72f453517217e7e987488f23707f82cd3.
Updated by Riccardo De Contardi over 6 years ago
- Status changed from Resolved to Closed