【问题标题】:TYPO3 - Deactivating cHash in own extension causes error when accessing recordTYPO3 - 在自己的扩展中停用 cHash 会导致访问记录时出错
【发布时间】:2017-12-28 14:17:46
【问题描述】:

如果我将 noCacheHash="1" 添加到 link.action 我可以停用 cHash:

<f:link.action action="show" pageUid="43" arguments="{record:record.uid}" noCacheHash="1">{record.name}</f:link.action>

/?tx_abc_abc[record]=1&tx_abc_abc[action]=show&tx_abc_abc[controller]=Abc

但是在尝试访问记录时出现以下错误:

Uncaught TYPO3 Exception
#1509296606: Failed to fetch error page "domain/index.php?id=72", reason: Client error: `GET domain/index.php?id=72` resulted in a `401 Unauthorized` response: <script>window.location.href='domain/access-denied/';</script><noscript>Error 401 - Access Deni (truncated...)

20 TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::pageErrorHandler("domain/index.php?id=72", "HTTP/1.0 404 Not Found", "Request parameters could not be validated (&cHash empty)")

停用cHash时如何正确访问记录?

【问题讨论】:

  • 添加到打字稿中的方法是:plugin.tx_yourextension.features.requireCHashArgumentForActionArguments = 0 但是这样稳定和安全吗?

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


【解决方案1】:

这不是 noCacheHash 参数的原因。我认为您为 pageID(43) 设置了特殊权限。因此,此记录无法访问此页面。

所以,首先检查这个页面的访问权限。

【讨论】:

    猜你喜欢
    • 2018-06-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多