【问题标题】:Typo3 Extension ke_search unable to load configuration / templatesTypo3 扩展 ke_search 无法加载配置/模板
【发布时间】: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


    【解决方案1】:

    您是否在 Typoscript-Object-Browser 的模板后端模块中显示了 TYPO3 为该页面计算的内容?您必须有类似屏幕截图中的输出:[TYPO3 对象浏览器的屏幕截图] [1]:https://i.stack.imgur.com/UZ4es.jpg

    【讨论】:

    • 使用对象浏览器发现 tx_kesearch_pi1 根本没有加载,只是 tx_news 显示为插件中的一个条目
    【解决方案2】:

    我发现了错误:我在树的某处有另一个错字,它覆盖了 templateRootPath、partialRootPath 和 layoutRootPath 设置。除去这个罪魁祸首后,一切都按预期进行。

    【讨论】:

      猜你喜欢
      • 2014-08-31
      • 1970-01-01
      • 1970-01-01
      • 2016-06-29
      • 2018-06-07
      • 2021-12-12
      • 2022-07-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多