Review 10.4 Merged

71913[BUGFIX] Consider language in redirects:checkintegrity

Benni Mack CR +2 V +2 Normal +186 −63 updated 10/21/21, 13:44

Commit message

The ext:redirects integrity check was implemented
without considering site language host and prefix for
the integrity check, thus reporting false positive
redirect conflicts.

This patch collects page uris, respecting the site
language configuration for the page language. This way,
the same slugs for multiple languages are not detected
as conflicting anymore. Furthermore tests are extended
to verify that the same slugs within several language
variants of one page are covered correctly.

Example for false positive redirect conflict:

- pages.slug=/test
- pages.sys_language_uid=1
- url: https://example.com/de/test

Now, assuming no other page of the same language has
the slug /test and a redirect has a source_path=/test,
there should be no match.

Several @todo were added which need deeper research
and are out of the scope of this patch.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Sybille Peters +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Sybille Peters +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 911

  1. Benni Mack commented on patch set 1 10/21/21, 10:27

    Cherry Picked from branch master. The following files contain Git conflicts: * typo3/sysext/redirects/Classes/Service/IntegrityService.php * typo3/sysext/redirects/Tests/Functional/Service/IntegrityServiceTest.php
  2. core-ci voted on patch set 1 V -1 10/21/21, 10:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18397

  3. Benni Mack marked it ready for review 10/21/21, 10:35

  4. Sybille Peters commented on patch set 1 10/21/21, 11:04

    There are still merge conflicts in the file. When I tested the patch for 10.4, I had a lot of merge conflicts too. I then copied the entire file IntegrityService from 11 and just replaced fetchAssociative() with fetch() in 2 places. I guess that is a little unorthodox to do. But streamlining 10 and 11 would be helpful in the future to backport the other changes - if needed.
  5. Stefan Bürk uploaded patch set 2 10/21/21, 11:15

  6. Stefan Bürk commented on patch set 2 10/21/21, 11:19

    Reply

    Not that hard. Locally tests where okay. Let's see what Core CI has to say now. Basicly solving merge conflict cleanly. Manually changes: * replace 'fetchAssociative()' with 'fetch()' * removed 2 tailing slashes for where() constraints, to be keep php7.2 compatibility (parsing error)
  7. core-ci voted on patch set 2 V +1 10/21/21, 11:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18399

  8. Stefan Bürk commented on patch set 2 V +1 CR +1 10/21/21, 11:24

    Sybille, do you want to retry the exact patchset in your instance ?
  9. Sybille Peters commented on patch set 2 V +1 CR +1 10/21/21, 12:58

    Thank you 😊
  10. Benni Mack voted on patch set 2 V +2 CR +2 10/21/21, 13:44

  11. Benni Mack merged patch set 3 10/21/21, 13:44