【问题标题】:TYPO3 Frontent: Form Action results Page not foundTYPO3 前端:未找到表单操作结果页面
【发布时间】:2018-09-27 07:53:34
【问题描述】:

我正在将 TYPO3 从 6.2.31 迁移到 8.7.19。

在我的模板中,我使用了一个导航栏,它应该根据类别过滤视频列表。导航栏是一个公式:

<f:if condition="{loggedIn}">
    <f:then>
        <form name="audit_vw_filter" method="post" id="audit_vw_filterForm"
              action="?tx_vidverwaltung_vidverwaltungfrontend[action]=listSelectedMember&tx_vidverwaltung_vidverwaltungfrontend[controller]=FrontendVideo">
    </f:then>
    <f:else>
        <form name="audit_vw_filter" method="post" id="audit_vw_filterForm"
              action="?tx_vidverwaltung_vidverwaltungfrontend[action]=listSelectedPublic&tx_vidverwaltung_vidverwaltungfrontend[controller]=FrontendVideo">
    </f:else>
</f:if>
...
<f:for each="{categories}" as="category" iteration="i">
<div>
    //list the category
    <span id="fontRed{category.uid}" class="vw_navigationbarFilter filterLinkCategory" onclick="setActualCategory('{category.name}','{category.uid}')">{category.name}</span>
</div>
...
</f:for>
</f:form>

在 JavaScript 中,我将每个类别都声明为单击时提交。

...    
$("#vw_filterForm").submit();

所以现在应该执行我的表单中的操作并调用我的“FrontendVideo”控制器,它应该以调试的形式给我一个反馈。

public function listSelectedMemberAction () {
    DebuggerUtility::var_dump("Hello World");
    ...
}

似乎没有达到控制器的功能。 取而代之的是一个友好的“找不到页面”:/

正如预期的那样,网址是:

http://example.de/.../.../?tx_vidverwaltung_vidverwaltungfrontend[action]=listSelectedMember&tx_vidverwaltung_vidverwaltungfrontend[controller]=FrontendVideo

在旧版本 6.2.31 上运行良好。所以也许我调用控制器函数的方式发生了变化,或者可能是 realurl 等问题......

提前致谢!

【问题讨论】:

    标签: javascript php typo3-8.x typo3-extensions


    【解决方案1】:

    我发现了问题:

    在旧的 TYPO3 版本中,TYPO3_CONF_VARS['FE']['pageNotFoundOnCHashError'] 默认设置为 true,因此如果 cHash 为空,则会输出错误消息。

    所以我倾向于将 pageNotFoundOnCHashError 恢复为“false”作为默认值。

    要做到这一点,进入你的

    安装工具 > 所有配置 > 前端

    并将 pageNotFoundOnCHashError 更改为 false

    [FE][pageNotFoundOnCHashError] = false
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-04
      • 2011-11-10
      • 1970-01-01
      • 2018-10-13
      相关资源
      最近更新 更多