You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TYPO3升级至V12遇扩展扫描及后端报错问题求助

问题:TYPO3 11.5扩展扫描报错及TYPO3 12升级失败问题解决建议

当前环境

  • TYPO3 11.5
  • news 11.4
  • eventnews 6.0.2
  • container 2.3.6
  • PHP 8.2

问题描述

即使卸载自定义扩展后,「扫描扩展文件」模块仍检测到news、container、eventnews扩展存在错误,另一套环境也出现相同问题;升级至TYPO3 12后,Installtool和后端浏览器控制台出现严重错误(提示“eval could not be processed”),已多次在升级前后清理相关缓存,推测上述扩展暂不兼容TYPO3 V12。

container扩展错误

Classes/Command/SortingCommand.php Method "run()" supports only 0 arguments. (weak)
Classes/Command/SortingInPageCommand.php Method "run()" supports only 0 arguments. (weak)
Classes/Command/IntegrityCommand.php Call to method "error()" (weak)
Classes/Hooks/TableConfigurationPostProcessing.php Usage of class "TYPO3\CMS\Core\Database\TableConfigurationPostProcessingHookInterface"(strong)
Classes/Updates/ContainerMigrateSorting.php Method "run()" supports only 0 arguments. (weak)
Classes/Updates/ContainerMigrateSorting.php Method "run()" supports only 0 arguments. (weak)
Classes/View/ContainerLayoutView.php Fetch of property "id" (weak)
Classes/View/ContainerLayoutView.php Fetch of property "id" (weak)
ext_localconf.php Access to array key "extTablesInclusion-postProcessing" (weak)
ext_localconf.php TYPO3\CMS\Core\Package\PackageManager::__construct requires at least 1 arguments (0 given). (strong)

news扩展错误

Classes/Controller/AdministrationController.php Usage of class "TYPO3\CMS\Backend\View\BackendTemplateView" (strong)
Classes/DataProcessing/AddNewsToMenuProcessor.php Fetch of property "sys_page" (weak)
Classes/ViewHelpers/MetaTagViewHelper.php Fetch of property "recordRegister" (weak)
Classes/ViewHelpers/MetaTagViewHelper.php Fetch of property "recordRegister" (weak)
Classes/ViewHelpers/MetaTagViewHelper.php Fetch of property "recordRegister" (weak)
Classes/ViewHelpers/TitleTagViewHelper.php Fetch of property "recordRegister" (weak)
Classes/ViewHelpers/TitleTagViewHelper.php Fetch of property "recordRegister" (weak)
Classes/ViewHelpers/TitleTagViewHelper.php Fetch of property "recordRegister" (weak)

eventnews扩展错误

Classes/Controller/NewsController.php Fetch of property "id" (weak)
Classes/ViewHelpers/RedirectViewHelper.php Use of static class method call "TYPO3\CMS\Core\Utility\HttpUtility::redirect()" (strong)
Tests/Unit/Hooks/IconHookTest.php Method "run()" supports only 0 arguments. (weak)

解决建议

针对TYPO3 11.5下的扩展扫描错误

  • 区分错误等级处理:标记为(weak)的错误多为代码规范或弃用提示,不影响系统正常运行,可暂时忽略;重点处理(strong)级错误,这类错误可能导致功能异常或后续升级障碍。
  • 修复核心强错误:
    • container扩展:
      • TableConfigurationPostProcessingHookInterface在TYPO3 11.5中已被弃用,需替换为TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent事件监听。
      • PackageManager直接实例化错误,应通过依赖注入(DI)获取实例,修改ext_localconf.php中相关代码,避免直接new PackageManager()。
    • news扩展:BackendTemplateView在TYPO3 11中已逐步被ModuleTemplate替代,需修改AdministrationController中的视图实例化逻辑。
  • 更新扩展到兼容小版本:检查各扩展的官方版本列表,升级到对应TYPO3 11.5的最新小版本,很多兼容性问题会在后续小版本中修复。

针对TYPO3 12升级失败问题

  • 匹配扩展兼容版本:
    • news:需升级至12.x及以上版本(官方要求TYPO3 12对应news 12+)。
    • eventnews:需升级至7.x及以上版本(eventnews 7+适配TYPO3 12)。
    • container:需升级至4.x及以上版本(container 4+适配TYPO3 12)。
  • 遵循标准升级流程:
    1. 在TYPO3 11.5环境中,先将所有扩展更新到TYPO3 11兼容的最新版本,确保「扫描扩展文件」无强错误。
    2. 执行预升级检查命令:typo3/sysext/core/bin/typo3 upgrade:check,根据提示修复所有前置问题。
    3. 升级TYPO3核心到12.x版本,然后逐一安装更新后的兼容扩展版本。
    4. 清理所有缓存(包括var/cache目录、数据库缓存),运行Installtool中的所有升级向导,完成数据库结构更新。
  • 排查"eval could not be processed"错误:该错误源于旧扩展使用了TYPO3 12已移除的API(如废弃的视图助手、钩子、命令类结构),需确保所有扩展完全适配TYPO3 12的新API规范,重点检查视图助手、命令类、事件监听的实现方式。

内容的提问来源于stack exchange,提问作者Stefan Padberg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.25 05:40:40