Project

General

Profile

Actions

Bug #102476

closed

Siteconfig settings.redirects.httpStatusCode not working. Mistake in SlugService.php

Added by Markus A almost 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2023-11-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

Hello,

in TYPO3\CMS\Redirects\Service\SlugService is a mistake.

Wrong:

Line 142: $this->httpStatusCode = (int)$settings->get('httpStatusCode', 307);

Correct:

Line 142: $this->httpStatusCode = (int)$settings->get('redirects.httpStatusCode', 307);

Otherwise Siteconfig:

settings:
  redirects:
    httpStatusCode: 301

is not working.
See: https://docs.typo3.org/c/typo3/cms-redirects/main/en-us/Setup/Index.html

TYPO3 11 and below is working correctly.

For the moment you can use this config:

settings:
  httpStatusCode: 301

Regards,
Markus


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #99048: Site Settings PHP APIClosedBenni Mack2022-11-10

Actions
Actions

Also available in: Atom PDF