Project

General

Profile

Actions

Bug #95650

closed

redirects:checkintegrity will falsely show redirect as conflict (if source_path=slug in translated page)

Added by Sybille Peters about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2021-10-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

versions

  • 10.4.21
  • current "master"

Problem

redirects:checkintegrity reports "false positives": redirect problems which are not problems.

Causes of this problem

Problem occurs, if the "source_path" of a redirect is the same slug as a translated page.

But this is not an actual redirects conflict: the source_path of the redirect does not affect any page (because e.g. /de/ is prepended to the slug of translated page).

It looks like redirects:checkintegrity does not consider the language correctly.

Reproduce

  1. Create a page with one slug and translation with a different slug, e.g. "language-alt"

EN (default language): slug=/language [421]
DE: slug=/language-alt, effective URL is /de/language-alt

2. Now create redirect using the slug on the translation page as source and pointing to target page:

/language-alt > t3://page?uid=421

So, we are redirecting a slug which currently does not map to a page at all to an existing page.

4. result is: checkintegrity "detects" this as error

Redirect (Host: t3coredev, Path: /language-alt) conflicts with /language-alt

This is wrong. All URLs work and the redirect works:

DB

pages:

+-----+-----+------------------+-------------+---------------+
| uid | pid | sys_language_uid | l10n_parent | slug                                         |
+-----+-----+------------------+-------------+---------------+
| 421 | 420 |                0 |           0 | /language     |
| 422 | 420 |                2 |         421 | /language-alt |
+-----+-----+------------------+-------------+---------------+

sys_redirect:

+---------------+-------------------+
| source_path   | target            |
+----------------------------------------------+-------------------+
| /language-alt | t3://page?uid=421 |
+---------------+-------------------+

Impact of problem

It is not easily possible to detect "redirect loops" or other real problems. These may occur on a regular basis. You can't leave the site unmaintained because editors can't fix them themselves and you can't give editors access to redirects module because they would have access to all redirects.

After running with TYPO3 v10 for about 6 months:

  • ~2000 redirects
  • redirects:checkintegrity reports : 124 entries

Update : After applying the patch (patchset 16):

  • redirects:checkintegrity reports : 98 entries (which are now real redirect conflict)

Also, on my site with several languages, there is a performance improvement when running redirects:checkintegrity:

  • before: ~43 minutes
  • after: ~6 minutes

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #92748: Infinite redirects (redirect loop) when updating slugsNew2020-11-02

Actions
Actions

Also available in: Atom PDF