Issue Bug Closed

#108530Site setting redirects.autoCreateRedirects: false has no effect - redirects are still created automatically

Wolfgang Wagner 12/19/25, 06:59 updated 03/31/26, 08:59

Description

According to the documentation at https://docs.typo3.org/permalink/typo3-cms-redirects:site-configuration, the site setting `redirects.autoCreateRedirects` should control whether redirects are automatically created when a page slug changes.

Expected behavior: When setting `autoCreateRedirects: false` in the site configuration, no automatic redirects should be created when changing page slugs.

Actual behavior: Redirects are still being created automatically despite the setting being set to false.

Configuration:

File: config/sites/<site>/config.yaml</site>

settings:
  redirects:
    autoCreateRedirects: false

Steps to reproduce:

1. Add the above configuration to a site’s config.yaml
2. Clear all caches
3. Change the slug of a page in the backend
4. Save the page
5. Check the redirect records in the backend module

Result:

A redirect record is created despite autoCreateRedirects: false

TYPO3 Version: TYPO3 13.4.22

Tested in two separate installations with the same result.

Reviews 2

History 810

  1. Wolfgang Wagner commented <span data-processor="relativetime" data-value="2025-12-19T07:03:27+00:00" > 12/19/25, 07:03 </span>

    settings:
      redirects:
        autoCreateRedirects: false

    Just to avoid any misunderstanding, the code is indented correctly on my end. I just accidentally used Markdown code above…

  2. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-12-19T08:16:28+00:00" > 12/19/25, 08:16 </span>

    I could not reproduce that here. Are you by chance including site set settings that override this setting to “true”?

    Does your flash message read:

    Because you renamed a slug, the slugs of all sub-pages were updated for you automatically.
    or
    Because you renamed a slug, the slugs of all sub-pages were updated and redirects were created for you automatically.

    Could you set a breakpoint on typo3/sysext/redirects/Classes/Service/SlugService.php in method initializeSettings and inspect what $this->autoCreateDirects is set to?

    For me this properly is set to “false”, and then does not create a redirect.

    You could also try to edit typo3/sysext/redirects/Configuration/Sets/redirects/settings.definitions.yaml and remove redirects.autoCreateRedirects there as a value to see if it has the impact I think it has.

  3. Wolfgang Wagner commented <span data-processor="relativetime" data-value="2025-12-19T08:36:06+00:00" > 12/19/25, 08:36 </span>

    I think I’ve found the problem. Your reference to the site set was crucial.

    According to the documentation, the code must be placed in the site config.yaml. But when working with site sets, it must be placed in settings.yaml. Then it works.

  4. Garvin Hicking commented and changed status Needs Feedback Accepted <span data-processor="relativetime" data-value="2025-12-19T08:38:15+00:00" > 12/19/25, 08:38 </span>

    Ah I see. Do you maybe have a wording suggestion change on how we could update the docs? Something like:

    “Note that when using site settings, the configuration directives must be adjusted in the appropriate settings.yaml file”

    ?

  5. Gerrit Code Review pushed patch set 4 for main to change 92174 status Accepted Under Review <span data-processor="relativetime" data-value="2025-12-19T09:53:14+00:00" > 12/19/25, 09:53 </span>

  6. Wolfgang Wagner commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-12-19T10:30:09+00:00" > 12/19/25, 10:30 </span>

    Applied in changeset commit:f256fbc1691a9070200d0820d435ecfa896937c2.