将所有错误重定向到404页

时间:2019-04-04 10:49:44

标签: typo3 typo3-8.x

如何强制TYPO3显示404页面而不显示技术错误?

如果TYPO3无法将给定的url解析为属性的示例,则出现以下错误:

Oops, an error occurred!
Exception while property mapping at property path "": The identity 
property "dfgdfgdfgdfgdfgdfgdfg" is no UID.
More information regarding this error might be available online.

我已经尝试通过配置来解决它

$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'] = 
'USER_FUNCTION:.....';
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] = 
 'USER_FUNCTION:.....';

但这对这些类型的错误似乎没有任何影响。

1 个答案:

答案 0 :(得分:0)

您从这里尝试过

It will better if you set if from install tool

set this variable from install tool :pageUnavailable_handling

希望这对您有帮助!