【发布时间】:2018-09-20 14:17:15
【问题描述】:
尝试从我的扩展程序中打开一个包含 html 文件的站点,出现此错误:(TYPO3 版本 8.7.19)
1407060572: Fluid parse error in template
partial_Video/VideoSlide_016cfc0cd210899384d5d10b02b3336b438691df, line 47 at
character 1. Error: The ViewHelper "<v:switch>" could not be resolved. Based on
your spelling, the system would load the class
"FluidTYPO3\Vhs\ViewHelpers\SwitchViewHelper", however this class does not
exist. (error code 1407060572). Template source chunk: <v:switch value="
{fegroup.uid}">
根据报错信息,Viewhelper和switch语句有问题。
这里是 using 命名空间
{namespace v=FluidTYPO3\vhs\ViewHelpers}
这里是switch语句的代码:
<f:if condition="{v:variable.get(name: 'access', useRawKeys: 1)}">
<!-- ... -->
<f:else>
<f:for each="{video.fegroupUID}" as="fegroup" iteration="iterator">
<v:switch value="{fegroup.uid}">
<v:case case="2" break="TRUE">
<div class="thumbnailcontainer_overlay">
<p><f:translate key="thumbnail_justforregisteredusers"/></p>
</div>
</v:case>
...
无论我改变什么,我总是得到同样的错误,如上所示。即使我注释掉负责的部分,这让我很困惑! 我已经清除了所有 chaches(在安装工具中),尝试了其他命名空间并仔细检查了我的 switch 语句。
提前致谢!
【问题讨论】:
标签: php typo3-8.x typo3-extensions