Bug #42932
closedCall to userFunc tx_indexedsearch->main cause uncaught exception
100%
Description
Uncaught TYPO3 Exception
#1: PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Frontend\ContentObject\AbstractContentObject::__construct() must be an instance of TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer, none given, called in /var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4157 and defined in /var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/AbstractContentObject.php line 48 (More information)
TYPO3\CMS\Core\Error\Exception thrown in file
/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 110.
13 TYPO3\CMS\Core\Error\ErrorHandler::handleError(4096, "Argument 1 passed to TYPO3\CMS\Frontend\ContentObj…tility/GeneralUtility.php on line 4157 and defined", "/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/AbstractContentObject.php", 48, array)
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/AbstractContentObject.php:
00046: * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj
00047: */
00048: public function __construct(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj) {
00049: $this->cObj = $cObj;
00050: $this->fileFactory = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance();
12 TYPO3\CMS\Frontend\ContentObject\AbstractContentObject::__construct()
/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
04155: } else {
04156: $fullyQualifiedClassName = '\\' . $finalClassName;
04157: $instance = new $fullyQualifiedClassName();
04158: }
04159: // Create alias if not present
11 TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("TYPO3\CMS\Frontend\ContentObject\SearchResultContentObject")
/var/www/share/typo3_src-6.0/typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php:
00410: $sWordArray = array(array('sword' => trim($inSW), 'oper' => 'AND'));
00411: } else {
00412: $search = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\SearchResultContentObject');
00413: $search->default_operator = $defOp == 1 ? 'OR' : 'AND';
00414: $search->operator_translate_table = $this->operator_translate_table;
10 TYPO3\CMS\IndexedSearch\Controller\SearchFormController::getSearchWords(0)
/var/www/share/typo3_src-6.0/typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php:
00377: }
00378: // This gets the search-words into the $sWArr:
00379: $this->sWArr = $this->getSearchWords($this->piVars['defOp']);
00380: }
00381:
9 TYPO3\CMS\IndexedSearch\Controller\SearchFormController::initialize()
/var/www/share/typo3_src-6.0/typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php:
00167: $this->pi_setPiVarDefaults();
00168: // Initialize:
00169: $this->initialize();
00170: // Do search:
00171: // If there were any search words entered...
8 TYPO3\CMS\IndexedSearch\Controller\SearchFormController::main("", array)
7 call_user_func_array(array, array)
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
06371: $content,
06372: $conf
06373: ));
06374: } else {
06375: $GLOBALS['TT']->setTSlogMessage('Method "' . $parts1 . '" did not exist in class "' . $parts0 . '"', 3);
6 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::callUserFunction("tx_indexedsearch->main", array, "")
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php:
00053: }
00054: $this->cObj->includeLibs($conf);
00055: $tempContent = $this->cObj->callUserFunction($conf['userFunc'], $conf, '');
00056: if ($this->cObj->doConvertToUserIntObject) {
00057: $this->cObj->doConvertToUserIntObject = FALSE;
5 TYPO3\CMS\Frontend\ContentObject\UserContentObject::render(array)
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php:
00894: return $this->getContentObject('USER_INT')->render($conf);
00895: } else {
00896: return $this->getContentObject('USER')->render($conf);
00897: }
00898: }
4 TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::USER
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:
03462: break;
03463: case 'FUNC':
03464: $incContent = $INTiS_cObj->USER;
03465: break;
03466: case 'POSTUSERFUNC':
3 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::INTincScript_process(array)
/var/www/share/typo3_src-6.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php:
03402: $INTiS_config = $this->config['INTincScript'];
03403: $this->INTincScript_includeLibs($INTiS_config);
03404: $this->INTincScript_process($INTiS_config);
03405: // Check if there were new items added to INTincScript during the previous execution:
03406: $INTiS_config = array_diff_assoc($this->config['INTincScript'], $INTiS_config);
2 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::INTincScript()
/var/www/share/typo3_src-6.0/typo3/sysext/cms/tslib/index_ts.php:
00219: if ($TSFE->isINTincScript()) {
00220: $TT->push('Non-cached objects', '');
00221: $TSFE->INTincScript();
00222: $TT->pull();
00223: }
1 require("/var/www/share/typo3_src-6.0/typo3/sysext/cms/tslib/index_ts.php")
/var/www/share/typo3_src-6.0/index.php:
00040: \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->baseSetup('');
00041:
00042: require(PATH_tslib . 'index_ts.php');
00043: ?>
Files
Updated by Patrick Broens over 11 years ago
- Status changed from New to Needs Feedback
Hi Marcus, could you explain how to reproduce this? There is another problem #42930 which prevents me from displaying Indexed Search completely, so I'm wondering how this one came up?
Updated by Marcos Fadul over 11 years ago
To be honest, I don't know exactly. I just imported a running site into Typo3 v6 (using a new theme) and the problem pop up. After I remove the indexedsearch configuration in the pageTS the problem disappear and the #42930 come up.
I wasn't able to reproduce it anymore, after fixing the #42930 issue, even though I insert again the configuration for the indexedsearch.
I guest we can close the issue as not valid (?)
Updated by Stefan Reichelt over 11 years ago
- File TYPO3-exception.jpg TYPO3-exception.jpg added
Hello there,
I have the same error. I wanted to try out the introduction package for 6.0rc1 (default installation, did no changes I'm aware of to it) and in the frontend when I try to search anything (any string) through the searchbox the exception as shown in the description/screenshot comes up.
Some data of my setup:
TYPO3 6.0rc1 Introduction Package
Apache 2.4.3
PHP 5.4.7
on my local machine Windows Vista 32bit.
I added a screenshot of the whole TYPO3 exception if that helps any.
Would be happy to give more info if possible.
Cheers!
edit:
Just realized there is a small change from the normal source in the screenshot.
In the uploaded TYPO3-exception.jpg at the part of:
12 TYPO3\CMS\Frontend\ContentObject\AbstractContentObject::__construct()
/var/www/share/typo3_src-6.0/typo3/sysext/core/Classes/Utility/GeneralUtility.php:
The lines and line numbers are wrong because I did some small changes to see what the error could be.
Now that I'm writing this, I also did a 'fix' by manually giving along the missing argument when indexed search comes along doing its thing. It worked but obviously that is not a valid solution to it. I figure that this wasn't anything noteworthy but now that I'm writing this I thought I mention it...
Anyway, the default lines of it are already given by Marcos Fadul in the issues description though.
Sorry about that, thought I'd already overwritten the file with a backup...
Updated by Christian Kuhn over 11 years ago
This was introduced by #42806 ... details need to be sorted out, maybe Helmut can help. SearchResultContentObject was tslib_search in 4.7 and did not extend the AbstractContentObject which has the constructor with the required parameter.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16641
Updated by Helmut Hummel over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 17226c69b0084b1cb791cb39c68a0d6b640284ab.