Review main Merged

72632[BUGFIX] Fix shortcut title generation in EditDocumentController

Oli Bartsch CR +2 V +2 Easy +30 −7 updated 12/13/21, 13:32

Commit message

Since #96154, the shortcut button is invalid in case
no `$displayName` is provided. For such case, the
ButtonBar throws an unhandled exception. The
EditDocumentController previously failed to ensure
that the corresponding value is always properly
set, which therefore led to mentioned exception
in some cases.

To fix this, it's now ensured that `getShortcutTitle()`
does always return a valid title. In case something is
wrong, e.g. no valid query arguments are provided, a
default title is used.

Previously, the `$recordId` in `getShortcutTitle()` was
always directly casted to an int. However, since it is
also possible to edit multiple records, the $recordId`
might be a comma separated list of uids. This case is
now also properly handled.

Note: The `getShortcutTitle()` is since #94182 also
used for the module title. This might be a misuse and
will therefore be further evaluated in another patch.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Riccardo De Contardi +1
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 79

  1. Oli Bartsch uploaded patch set 1 12/11/21, 00:20

  2. Oli Bartsch updated the commit message in patch set 2 12/11/21, 00:21

  3. core-ci voted on patch set 1 V +1 12/11/21, 00:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20973

  4. core-ci voted on patch set 2 V +1 12/11/21, 00:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20974

  5. Riccardo De Contardi voted on patch set 2 V +1 12/11/21, 11:38

  6. Stefan Bürk voted on patch set 2 V +1 CR +1 12/12/21, 23:46

  7. Benni Mack voted on patch set 2 V +1 CR +1 12/13/21, 12:27

  8. Oli Bartsch voted on patch set 2 V +2 CR +2 12/13/21, 13:31

  9. Oli Bartsch merged patch set 3 12/13/21, 13:32