【发布时间】:2019-02-12 18:05:28
【问题描述】:
我正在尝试将typo3 7.6.32 安装迁移到8.7.24。在将所有扩展更新到最新版本并进行基本页面设置和工作后,ke_search 扩展只在一个特定页面上中断。
实际错误信息:
Argument 1 passed to TYPO3\CMS\Fluid\View\StandaloneView::setTemplateRootPaths() must be of the type array, null given, called in /var/www/web18/htdocs/relaunch2016_t3v8/typo3conf/ext/ke_search/pi1/class.tx_kesearch_pi1.php on line 95
TypeError thrown in file
/var/www/web18/htdocs/typo3_src-8.7.24/typo3/sysext/fluid/Classes/View/StandaloneView.php in line 178.
16 TYPO3\CMS\Fluid\View\StandaloneView::setTemplateRootPaths(NULL)
/var/www/web18/htdocs/relaunch2016_t3v8/typo3conf/ext/ke_search/pi1/class.tx_kesearch_pi1.php:
00093: {
00094: $this->searchFormView = GeneralUtility::makeInstance('TYPO3\\CMS\\Fluid\\View\\StandaloneView');
00095: $this->searchFormView->setTemplateRootPaths($this->conf['templateRootPaths']);
00096: $this->searchFormView->setPartialRootPaths($this->conf['partialRootPaths']);
00097: $this->searchFormView->setLayoutRootPaths($this->conf['layoutRootPaths']);
15 tx_kesearch_pi1::initFluidTemplate()
/var/www/web18/htdocs/relaunch2016_t3v8/typo3conf/ext/ke_search/pi1/class.tx_kesearch_pi1.php:
00067:
00068: // init template for pi1
00069: $this->initFluidTemplate();
00070:
00071: // hook for initials
这会持续几行,但我认为问题出在这部分。
我试过this solution 但无济于事。据我所知(使用 Typo3 对象浏览器)根本没有为 ke_search 加载整个配置。
这是 7.6 的原始排版(部分):
plugin.tx_kesearch_pi1 {
templateRootPath = fileadmin/fluidtpl/_kesearch/Templates/
partialRootPath = fileadmin/fluidtpl/_kesearch/Partials/
layoutRootPath = fileadmin/fluidtpl/_kesearch/Layouts/
}
plugin.tx_kesearch_pi2 {
templateRootPath = fileadmin/fluidtpl/_kesearch/Templates/
partialRootPath = fileadmin/fluidtpl/_kesearch/Partials/
layoutRootPath = fileadmin/fluidtpl/_kesearch/Layouts/
}
使用前面提到的答案中的解决方案:
plugin.tx_kesearch_pi1 {
templateRootPaths {
5 = EXT:ke_search/Resources/Private/Templates/
}
partialRootPaths {
5 = EXT:ke_search/Resources/Private/Partials/
}
layoutRootPaths {
5 = EXT:ke_search/Resources/Private/Layouts/
}
}
plugin.tx_kesearch_pi2 {
templateRootPaths {
5 = EXT:ke_search/Resources/Private/Templates/
}
partialRootPaths{
5 = EXT:ke_search/Resources/Private/Partials/
}
layoutRootPaths {
5 = EXT:ke_search/Resources/Private/Layouts/
}
}
我还尝试添加以前使用的模板作为后备,但似乎根本无法识别。我在每一步之后也清除了缓存,但没有任何改变,仍然是同样的错误。
我准备在一定程度上更改旧模板文件,但此时我什至无法让默认模板工作。
【问题讨论】:
标签: php typo3 faceted-search typo3-8.7.x