Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Ready for review Stale

95278[FEATURE] Add event to render content around record edit form

Konrad Michalik CR 0 V 0 Hard +338 −1 updated 09/18/26, 12:40

Commit message

The new PSR-14 event BeforeRecordEditFormIsRenderedEvent allows
extensions to render additional markup above and below the record
edit form. It is dispatched by both EditDocumentController and
ContextualRecordEditController, so listeners cover the full edit
form as well as the contextual edit form of the page module.

The page module (ModifyPageLayoutContentEvent) and the record list
(RenderAdditionalContentToRecordListEvent) have offered such an
extension point for a long time. For the edit form, extensions had
to rewrite the response body of the backend request instead, which
breaks on every markup change.

Extending the existing AfterFormEnginePageInitializedEvent was
considered as a backportable alternative, but that event is
dispatched before the form is built, it also fires for POST
requests that end in a redirect, and it does not exist in the
contextual controller at all.

The event deliberately exposes the request only. The contextual
template does not use the module layout, so a ModuleTemplate would
behave differently depending on the route.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/78/95278/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/78/95278/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Issues 1

Files 9

Review log 59

  1. Konrad Michalik uploaded patch set 1 08/12/26, 10:11

  2. core-ci voted on patch set 1 V +1 08/12/26, 10:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106494

  3. Konrad Michalik uploaded patch set 2 V +1 08/12/26, 12:51

  4. core-ci voted on patch set 2 V -1 08/12/26, 13:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106539

  5. core-ci voted on patch set 2 V +1 08/12/26, 13:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106539

  6. Simon Schaufelberger voted on patch set 2 CR +1 08/13/26, 00:33

  7. Konrad Michalik uploaded patch set 3 CR +1 V +1 09/17/26, 14:47

  8. core-ci voted on patch set 3 V +1 09/17/26, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108758

  9. Stefan Bürk commented on patch set 3 09/18/26, 12:40

    Unresolved

    Personally I'm not a fan of dispatching the same event from different places and context areas, and in my eyes this should be two dedicated PSR-14 events for each controller. On the otherhand - I also used a shared event in a series of extensions with a shared base extension (containing the event class itself) with context information, so from that point of view ... still not sure. Passing the request is good to pass the whole sink down, but we recently startet to ensure to pass the concrete and required data down instead of a full think, something we should at least discuss and consider here. Technically it's to injet custom html markup **before** and **after* the rendered controller content and I find the naming therefore quite confusing on the first look. Don't act directly - let's see what other contributors, reviewers or merger thinks. This is not **ment** to block it, more to encourage a discussion first to nail it down more precisly, unrelated to the outcome.