Review main Merged

93114[TASK] Move record header rendering from FormEngine to controllers

Benjamin Kott CR +2 V +2 Hard +382 −182 updated 05/25/26, 06:28

Commit message

The previous implementation rendered record headers, type icons and
record identity inside FormEngine's OuterWrapContainer. This forced
controllers like the contextual record editor to hide unwanted elements
via display:none CSS hacks, which is fundamentally wrong. This patch
moves the responsibility for rendering record headers and identity
information to the controllers themselves, allowing each controller to
decide what context to display.

The EditDocumentController now renders the record heading inline,
showing the plain record title for existing records and "Create new
{table}" for new records. A new getRecordIdentityHtml() method renders
the record type icon, label and uid as a compact identity component
placed next to the title, giving proper context also in multi-record
editing. A new resolveDocumentTitle() method builds a richer browser
tab and shortcut title with record title, type or table name and uid
for single records, or a summary with record count for multi-record
editing.

OuterWrapContainer is deprecated in favour of a new FormWrapContainer
that no longer renders any header, icon or record label and only
delegates to the appropriate record or field container.

The SiteConfigurationController now shows the plain site identifier as
heading instead of the "Edit site ..." wording. The
ContextualRecordEditController shows the plain record title, removing
the need for CSS display:none hacks on elements rendered by FormEngine.

Ten now-unused language labels have been marked with
x-unused-since="14.2". New labels have been added for the multi-record
document title and the site configuration heading.

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Georg Ringer +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Benjamin Franzke +1
    • Georg Ringer +1

Issues 2

Files 46

Show 26 more files

Review log 5887

Show 3862 earlier messages
  1. Benjamin Kott uploaded patch set 1 03/07/26, 01:53

  2. core-ci voted on patch set 1 V -1 03/07/26, 02:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97530

  3. Benjamin Kott uploaded patch set 2 V -1 03/09/26, 15:37

  4. Benjamin Kott updated the commit message in patch set 3 03/09/26, 15:43

  5. core-ci voted on patch set 2 V -1 03/09/26, 15:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97608

  6. Benjamin Kott uploaded patch set 4 03/09/26, 16:15

  7. core-ci voted on patch set 3 V -1 03/09/26, 16:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97609

  8. core-ci voted on patch set 4 V -1 03/09/26, 16:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97611

  9. Oli Bartsch commented on patch set 4 03/09/26, 17:19

    OuterWrapContainer.php:23

    This seems like a breaking change. FormEngine is public API. What about we just introduce a new container (used by ContextualRecordEditController) for this case?
  10. Benjamin Kott uploaded patch set 5 V -1 03/09/26, 17:32

  11. Benjamin Kott commented on patch set 5 03/09/26, 17:51

    OuterWrapContainer.php:23 Reply

    i am not sure what's the best solution here i pinged @lolli@schwarzbu.ch on this change. the patch now delivers the results intended also with the changed and adjusted titles and shortcut names - we now need to find a way make it work.
  12. Benjamin Kott uploaded patch set 6 03/09/26, 18:01

  13. core-ci voted on patch set 5 V -1 03/09/26, 18:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97614

  14. core-ci voted on patch set 6 V -1 03/09/26, 18:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97615

  15. Benjamin Kott uploaded patch set 7 V -1 03/09/26, 21:10

  16. core-ci voted on patch set 7 V -1 03/09/26, 21:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97620

  17. Benjamin Kott uploaded patch set 8 V -1 03/09/26, 21:59

  18. Benjamin Kott uploaded patch set 9 03/09/26, 22:02

  19. core-ci voted on patch set 8 V -1 03/09/26, 22:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97621

  20. core-ci voted on patch set 9 V -1 03/09/26, 22:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97622

  21. Benjamin Kott uploaded patch set 10 V -1 03/09/26, 23:02

  22. Benjamin Kott uploaded patch set 11 03/09/26, 23:35

  23. core-ci voted on patch set 10 V -1 03/09/26, 23:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97623

  24. Benjamin Kott uploaded patch set 12 03/09/26, 23:40

  25. core-ci voted on patch set 11 V -1 03/09/26, 23:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97624

  26. core-ci voted on patch set 12 V -1 03/10/26, 00:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97625

  27. Benjamin Kott uploaded patch set 13 V -1 03/10/26, 01:20

  28. core-ci voted on patch set 13 V -1 03/10/26, 01:50 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97628

  29. Benjamin Kott uploaded patch set 14 V -1 03/10/26, 10:34

  30. core-ci voted on patch set 14 V -1 03/10/26, 11:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97674

  31. Benjamin Kott uploaded patch set 15 V -1 03/10/26, 11:26

  32. core-ci voted on patch set 15 V -1 03/10/26, 11:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97681

  33. Benjamin Kott uploaded patch set 16 V -1 03/10/26, 11:50

  34. Benjamin Kott commented on patch set 16 03/10/26, 11:51

    OuterWrapContainer.php:23 Reply

    Done, restored the container and added a deprecation.
  35. Benjamin Kott uploaded patch set 17 03/10/26, 11:54

  36. Benjamin Kott uploaded patch set 18 03/10/26, 12:03

  37. core-ci voted on patch set 17 V -1 03/10/26, 12:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97685

  38. core-ci voted on patch set 18 V -1 03/10/26, 12:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97690

  39. Benjamin Kott uploaded patch set 19 V -1 03/10/26, 12:30

  40. core-ci voted on patch set 17 V -1 03/10/26, 12:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97685

  41. core-ci voted on patch set 19 V -1 03/10/26, 12:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97693

  42. Benjamin Kott uploaded patch set 20 V -1 03/10/26, 13:11

  43. Benjamin Kott uploaded patch set 21 03/10/26, 13:15

  44. core-ci voted on patch set 21 V +1 03/10/26, 13:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97697

  45. Benjamin Franzke commented on patch set 21 03/10/26, 19:59

    EditDocumentController.php:2044

    I think the label "Unique ID" is to verbose in this view. I'd prefer `[23233]` with title `Unique ID: 23233`.
  46. Christian Kuhn commented on patch set 21 03/10/26, 20:27

    i understand formEngine could have a different entry container so controllers have better 'surrounding' capabilities. i'll try to understand details of this approach within this week and will try to report.
  47. Benjamin Franzke uploaded patch set 22 V +1 03/10/26, 20:33

  48. Benjamin Franzke commented on patch set 22 03/10/26, 20:33

    EditDocumentController.php:2044 Reply

    Done
  49. Benjamin Franzke commented on patch set 22 03/10/26, 20:46

    Reply

    FYI: my vote and your comment overlapped – I did not intent to "ignore" this. For me the actual idea was easy to follow in patchset 15, before Benji added a new container, where he only stripped down the old one: https://review.typo3.org/c/Packages/TYPO3.CMS/+/93114/15/typo3/sysext/backend/Classes/Form/Container/OuterWrapContainer.php (alternatively also helpful: `diff typo3/sysext/backend/Classes/Form/Container/{OuterWrapContainer,FormWrapContainer}.php`) …and I think it makes sense to decouple all kinds of surroundings like: * record document `<title>` * record header (previously in OuterWrapContainer) * record breadcrumb and record breadcrumb to the controller To have a single point where surroundings for the respective context are managed.
  50. core-ci voted on patch set 22 V +1 03/10/26, 21:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97718

  51. Christian Kuhn commented on patch set 22 CR -1 03/13/26, 08:24

    i mainly looked at the formEngine/controllor side and think this part of the change is reasonable. it's fine with me when the nits are done.
    it would be good to rephrase here since latest patch set deprecates OuterWrapContainer and introduces a new one.

    EditDocumentController.php:360

    could we inline $documentTitle instead and hand it around if needed instead of creating even more class state?

    SiteConfigurationController.php:846

    no named arguments for casual methods.

    FormWrapContainer.php:25

    empty __construct() can be removed.
  52. Benjamin Kott uploaded patch set 23 CR +1 V +1 03/13/26, 13:15

  53. Benjamin Kott commented on patch set 23 03/13/26, 13:16

    Reply

    please resolve this when you are done checking the requested changes

    Reply

    Done

    EditDocumentController.php:360 Reply

    Done

    SiteConfigurationController.php:846 Reply

    Done

    FormWrapContainer.php:25 Reply

    Done
  54. core-ci voted on patch set 23 V -1 03/13/26, 13:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97898

  55. Benjamin Kott uploaded patch set 24 V -1 03/13/26, 14:02

  56. core-ci voted on patch set 24 V +1 03/13/26, 14:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97904

  57. Benjamin Kott commented on patch set 24 03/16/26, 07:22

    Reply

    Done
  58. Garvin Hicking commented on patch set 24 03/16/26, 08:01

    Deprecation-109192-FormEngineOuterWrapContainer.rst:62

    Could we have convenience API methods that would do this? formWrapContainer->renderRecordHeading() formWrapContainer->renderRecordFooting() Then maybe we could even think about keeping "outerWrapContainer" and just parametrize it, and set "showHeader/showFooter" to true for now, but "false" for the future. This could then allow extensions to more seamlessly upgrade and not break, if they don't care about that extra info...?

    locallang_core.xlf:384

    We could utilize ICU plural form syntax here?
  59. Benjamin Kott uploaded patch set 25 V +1 03/16/26, 09:38

  60. Benjamin Kott commented on patch set 24 03/16/26, 09:41

    Deprecation-109192-FormEngineOuterWrapContainer.rst:62 Reply

    i think the form-engine should not care about, this is what the patch actually does. there is no benefit in having these generic titles for the forms. i agree that generating the titles is not straight forwards but this is something to resolve somewhere else. you will only run into this if you have modules that manually generate form engine editing views that do not use the edit document controller.

    locallang_core.xlf:384 Reply

    Done
  61. core-ci voted on patch set 25 V -1 03/16/26, 09:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98000

  62. Benjamin Kott uploaded patch set 26 V -1 03/16/26, 10:42

  1. core-ci voted on patch set 26 V +1 03/16/26, 10:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98007

  2. Garvin Hicking commented on patch set 26 03/17/26, 07:46

    Deprecation-109192-FormEngineOuterWrapContainer.rst:62 Reply

    Sorry I forgot to reply here. I'm not deep enough into the specifics here and trust your process, so am resolving this.
  3. Benjamin Franzke commented on patch set 26 CR -1 03/17/26, 11:30

    EditDocumentController.php:354

    There is an empty `<h1></h1>` when opening an extbase plugin like `blog_posts`. Let's add `[No title]`.
  4. Benjamin Kott uploaded patch set 27 CR -1 V +1 03/17/26, 14:57

  5. Benjamin Kott commented on patch set 27 03/17/26, 14:57

    EditDocumentController.php:354 Reply

    Done
  6. core-ci voted on patch set 27 V +1 03/17/26, 15:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98096

  7. Benjamin Franzke commented on patch set 27 CR +1 V +1 03/18/26, 04:13

    EditDocumentController.php:897

    In resolveDocumentTitle we use `core.core:labels.no_title` directly. I do not understand why we use `BackendUtility::getNoRecordTitle()` instead. From a security perspective that is less ideal, since we "need" to rely on `BackendUtility::getNoRecordTitle` applying `hsc`. Anyway, this is not wrong, but just opinion, so I'm fine with this.
  8. Benjamin Franzke rebased onto patch set 28 CR +1 V +1 03/18/26, 04:39

  9. core-ci voted on patch set 28 V +1 03/18/26, 04:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98125

  10. Benjamin Franzke voted on patch set 28 CR +1 V +1 03/18/26, 05:03

  11. Benjamin Franzke uploaded patch set 29 CR +1 V +1 03/18/26, 08:10

  12. Benjamin Franzke commented on patch set 29 03/18/26, 08:10

    EditDocumentController.php:897 Reply

    Adapted.
  13. Benjamin Franzke voted on patch set 29 CR +1 V +1 03/18/26, 08:10

  14. core-ci voted on patch set 29 V -1 03/18/26, 08:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98143

  15. Benjamin Franzke uploaded patch set 30 CR +1 V +1 03/18/26, 08:27

  16. Benjamin Franzke voted on patch set 30 CR +1 V +1 03/18/26, 08:27

  17. Georg Ringer voted on patch set 30 CR +1 V +1 03/18/26, 08:31

  18. Benjamin Franzke uploaded patch set 31 CR +1 V +1 03/18/26, 08:32

    Resolve Merge-Conflict
  19. Benjamin Franzke voted on patch set 31 CR +1 V +1 03/18/26, 08:32

  20. core-ci voted on patch set 30 V +1 03/18/26, 08:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98144

  21. Georg Ringer voted on patch set 31 CR +1 V +1 03/18/26, 08:42

  22. Benjamin Kott voted on patch set 31 CR +2 V +2 03/18/26, 08:43

  23. Benjamin Kott merged patch set 32 03/18/26, 08:43

  24. Oli Bartsch commented on patch set 32 03/18/26, 16:42

    Unresolved

    There is no reason given why the information on which page the current record (type) is edited is no longer relevant. Additionally, this now leads to displaying "undefined" when editing frontend users, see screenshot in #109289.
  25. Lina Wolf commented on patch set 32 05/25/26, 06:28

    Unresolved

    Is usage in TCA like in the ctrl container section affected as well? [container](https://docs.typo3.org/permalink/t3tca:confval-ctrl-container)? What about this example: [Add your own wizard](https://docs.typo3.org/permalink/t3tca:tca-example-ctrl-container-cusotm)