Review main Merged

87857[BUGFIX] Sanitize superfluous page-id from additional route arguments

Till Hörner CR +2 V +2 Normal +85 −0 updated 02/10/25, 22:35

Commit message

This change sanitizes a superfluous page-id from additional arguments
when creating URIs with PageRouter::generateUri() directly. When using
TypoScript 'typolink', PageLinkBuilder::calculateQueryParameters()
would have sanitized the superfluous page-id already.

* before: https://example.org/the-page-slug/?id=13
* after: https://example.org/the-page-slug

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1215

  1. Till Hörner uploaded patch set 1 01/22/25, 15:52

  2. core-ci voted on patch set 1 V +1 01/22/25, 16:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72867

  3. Benni Mack commented on patch set 1 01/22/25, 18:30

    I have to think about the concequences... although this seems "good" I wonder why this is and, if we actually do it on an even more centralized place.
  4. Oliver Hader commented on patch set 1 CR -1 01/23/25, 09:29

    I think it's too specific in `PreviewController` - thus should be located in `PageArguments` instead.
  5. Oliver Hader uploaded patch set 2 CR -1 V +1 01/23/25, 09:56

  6. core-ci voted on patch set 2 V +1 01/23/25, 10:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72915

  7. Oliver Hader marked it work in progress 01/23/25, 10:23

  8. Oliver Hader uploaded patch set 3 V +1 01/23/25, 10:41

  9. Oliver Hader uploaded patch set 4 01/23/25, 10:41

  10. Oliver Hader commented on patch set 4 01/23/25, 10:44

    This change is ready for review.
    `PageArguments` also was too specific, which worked only if there was another parameter next to `id` (e.g. `&id=1&ADMCMD_prev=LIVE`). I've placed the check now directly in `PageRouter->generateUri()`.
  11. core-ci voted on patch set 4 V +1 01/23/25, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/72919

  12. Andreas Kienast voted on patch set 4 CR +1 01/23/25, 11:16

  13. Georg Ringer voted on patch set 4 CR +1 V +1 02/10/25, 19:43

  14. Benni Mack voted on patch set 4 CR +2 V +2 02/10/25, 22:28

  15. Benni Mack merged patch set 5 02/10/25, 22:35