Review main Merged

91295[FEATURE] Add Username and creation date to redirects

Regis TEDONE CR +2 V +2 Normal +159 −3 updated 10/29/25, 21:44

Commit message

This feature adds the information when a redirect was
created and by whom.

It is added as a custom form element displaying
information: avatar, realName, username, creation date.

The information is only displayed for stored
record. In case the user can not be determined,
this is displayed accordingly.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 9

Review log 2431

Show 46 earlier messages
  1. Regis TEDONE uploaded patch set 1 10/27/25, 20:04

  2. core-ci voted on patch set 1 V -1 10/27/25, 20:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87733

  3. Benni Mack uploaded patch set 2 V -1 10/27/25, 20:49

  4. Benni Mack voted on patch set 2 CR +1 V +1 10/27/25, 20:49

  5. core-ci voted on patch set 2 V +1 10/27/25, 20:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87744

  6. Oli Bartsch commented on patch set 2 CR -1 10/27/25, 21:23

    RenderCreationInformation.php:26

    please make this final and internal

    RenderCreationInformation.php:71

    Please do not use such inline styles.

    RenderCreationInformation.php:94

    Could we use existing functionality here? It is also technically not usual to have database queries in a display related service directly.

    CreatedByDefaultProvider.php:26

    Why do we need this when we have the DH hook in place?

    locallang_db.xlf:129

    This label is not related to tca while based on the identifier it looks as it would

    ext_tables.sql:4

    Why do we define this here?
  1. Benni Mack uploaded patch set 3 CR +1 V +1 10/27/25, 21:35

  2. Benni Mack commented on patch set 3 10/27/25, 21:36

    RenderCreationInformation.php:26 Reply

    Done

    RenderCreationInformation.php:71 Reply

    Done

    RenderCreationInformation.php:94 Reply

    Done

    locallang_db.xlf:129 Reply

    Done

    ext_tables.sql:4 Reply

    because the TCA type is type=passthrough
  3. Benni Mack commented on patch set 3 10/27/25, 21:36

    CreatedByDefaultProvider.php:26 Reply

    Done
  4. core-ci voted on patch set 3 V -1 10/27/25, 21:43 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87748

  5. Oli Bartsch commented on patch set 3 10/27/25, 21:45

    RenderCreationInformation.php:40

    This makes no sense. Now for every redirect which does not have this field set (which is every record as this field is new), the creator is the current user..
  6. Benni Mack uploaded patch set 4 V -1 10/28/25, 06:51

  7. Benni Mack commented on patch set 4 10/28/25, 06:55

    RenderCreationInformation.php:40 Reply

    Done
  8. core-ci voted on patch set 4 V -1 10/28/25, 06:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87761

  9. Oli Bartsch commented on patch set 4 10/28/25, 07:26

    RenderCreationInformation.php:40 Reply

    Issue is still not resolved because `getBackendUserById` returns the current user for missing createdby field.
  10. Regis TEDONE uploaded patch set 5 V -1 10/28/25, 10:57

  11. core-ci voted on patch set 5 V -1 10/28/25, 11:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87798

  12. Stefan Bürk commented on patch set 5 10/29/25, 09:56

    So, this a single place "revert" of the `Remove TCA option "cruser_id"` [1]. Having it in the table makes it easier to get it (lateron) and is also more concrete than looking it up in the `sys_history` which may have been cleaned/shrinked and creator "removed" from the history chain. [1] https://review.typo3.org/c/Packages/TYPO3.CMS/+/75123

    SlugService.php:152

    ```suggestion 'createdby' => $this->context->getPropertyFromAspect('backend.user', 'id'),, ``` Let's avoid the global beuser access here. IMO taken from the `cruser_id` removal https://review.typo3.org/c/Packages/TYPO3.CMS/+/75123/12/typo3/sysext/redirects/Classes/Service/SlugService.php#b191
  13. Stefan Bürk commented on patch set 5 10/29/25, 09:59

    Reply

    Just wanted to mention this. Fine with adding the field ... not sure about data privacy concerns.
  14. Stefan Bürk commented on patch set 5 10/29/25, 10:02

    RenderCreationInformation.php:40 Reply

    Yeah ... the "current user" fallback is suboptimal. Could we not use something generic (system) or (unknown) to be rendered instead ?
  15. Stefan Bürk commented on patch set 5 CR -1 10/29/25, 10:10

    On it ... I'll take care of the comments.
  16. Stefan Bürk commented on patch set 5 10/29/25, 14:37

    Reply

    Still on it ..

    RenderCreationInformation.php:45

    * `datetime` does not exists. Should be `date`. * We could reuse the context to retrieve the current backenduser id instead of using the default.

    RenderCreationInformation.php:52

    We can inline `BU::getRecord()` here again as `$userId === 0` is already checked together early return (skip) done above. In case no record could be loaded we should also do the skip.
  17. Stefan Bürk uploaded patch set 6 CR -1 V -1 10/29/25, 14:58

  18. Stefan Bürk commented on patch set 6 10/29/25, 14:59

    Reply

    Done

    RenderCreationInformation.php:40 Reply

    @bo@cedev.de adjusted the implementation and I would say it works better now. Can you have a look again if it now works out for you ?

    RenderCreationInformation.php:45 Reply

    Done

    RenderCreationInformation.php:52 Reply

    Done

    SlugService.php:152 Reply

    Done
  19. Stefan Bürk voted on patch set 6 CR +1 V +1 10/29/25, 15:10

  20. core-ci voted on patch set 6 V +1 10/29/25, 17:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/87996

  21. Oli Bartsch uploaded patch set 7 CR +1 V +1 10/29/25, 20:02

  22. Oli Bartsch commented on patch set 7 CR +1 V +1 10/29/25, 20:02

    RenderCreationInformation.php:40 Reply

    Done

    ext_tables.sql:4 Reply

    Done
  23. core-ci voted on patch set 7 V +1 10/29/25, 20:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88041

  24. Benni Mack voted on patch set 7 CR +2 V +2 10/29/25, 21:44

  25. Benni Mack merged patch set 8 10/29/25, 21:44