首页 文章

TYPO3 v9.5.0 - Bootstrap Package url错误消息

提问于
浏览
0

我有一个TYPO3 9.5.0LTS并使用bootstrap包主题 . 它似乎全部工作......我定义了网站配置然后我得到了漂亮的网址...但我经常得到这样的错误消息:

核心:异常处理程序(WEB):未捕获TYPO3异常:#1436717266:标头“Expire”的标头值无效“ . 值必须是字符串或字符串数组 . |文件/is/www/typo3_src-9.5中抛出InvalidArgumentException第208行中的.0 / typo3 / sysext / core / Classes / Http / Message.php . 请求的URL:domain / content-examples / media / audio

是什么导致这种情况以及如何预防?

编辑:可能是第4244行的TYPO3 \ CMS \ Frontend \ Controller \ TypoScriptFrontendController :: getHttpHeadersForTemporaryContent()中的这一部分:

/**
 * Returns HTTP headers for temporary content.
 * These headers prevent search engines from caching temporary content and asks them to revisit this page again.
 * Please ensure to also send a 503 HTTP Status code with these headers.
 */
protected function getHttpHeadersForTemporaryContent(): array
{
    return [
        'Retry-after' => '3600',
        'Pragma' => 'no-cache',
        'Cache-control' => 'no-cache',
        'Expire' => 0,
    ];
}

...所以我把它改成'Expires'=> 0

2 回答

相关问题