TYPO3 v9.5.0 - Bootstrap 包 url 错误信息

TYPO3 v9.5.0 - Bootstrap Package url error message

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

核心:异常处理程序(WEB):未捕获的 TYPO3 异常:#1436717266:header "Expire" 的 header 值无效。该值必须是字符串或数组字符串。| 在文件 /is/www/typo3_src-9.5.0/typo3/sysext/core/Classes/Http/Message.php 的第 208 行中抛出 InvalidArgumentException。请求 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

https://forge.typo3.org/issues/86651#change-388813

"Expire"header好像打错了,应该是"Expires"。 尝试更改它: TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getHttpHeadersForTemporaryContent() 他们正在解决这个问题

UPD

TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController,第 4244 行

'Expire' => 0,

改为

'Expires' => '0',

https://forge.typo3.org/issues/86658

正确的 header 名称应该是 'Expires' afaik: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires

我想更改文件:

typo3_src-9.5.0/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

第 4244 行来自

'Expire' => 0,

'Expire' => '0',

有帮助。已报告此问题 https://forge.typo3.org/issues/86658,我相信会在下一次更新时更改。