Issue Bug Closed

#109462Contextual record edit: Page module not refreshed after save+close when record has no header

Christoph Hiesl 04/01/26, 13:24 updated 04/21/26, 11:30

Description

TYPO3 Version: 14.2 (introduced with Feature #109130)

Steps to reproduce:

1. Create a tt_content record without a header (or with an empty header field), e.g. a custom container element or any CType that typically has no title
2. Open the record via the contextual record edit panel (context panel)
3. Make a change, click “Save”, then click “Close“
4. Observe the page module — it still shows the old state
5. Manually reload the page (F5) — now the changes are visible

Expected behavior:

The page module should refresh after save+close, regardless of whether the record has a title.

Actual behavior:

The page module is not refreshed. The user has to manually reload the page to see the changes.

Root cause:

In contextual-record-edit-trigger.js, the typo3-modal-hidden event handler uses the recordTitle from the typo3:editform:saved postMessage to determine whether a refresh is needed:

e.addEventListener(“typo3-modal-hidden”, () => {
if (recordTitle !== “”) {
top.document.dispatchEvent(new CustomEvent(“typo3:pagetree:refresh”));
top.TYPO3.Backend.ContentContainer.refresh();
// show success notification
} else {
this.focus();
}
});

When recordTitle is an empty string (which happens for records without a header), the entire refresh branch is skipped — neither typo3:pagetree:refresh is dispatched nor ContentContainer.refresh() is called.

Suggested fix:

Replace the recordTitle !== “” check with a dedicated hasSaved boolean flag that tracks whether typo3:editform:saved was received, independent of the record title.
The recordTitle should only be used for the success notification message, not for the refresh decision.

let hasSaved = false;
let savedRecordTitle = “”;
if (actionName === “typo3:editform:saved”) {
hasSaved = true;
savedRecordTitle = data.recordTitle ?? “”;
}
if (hasSaved) {
top.document.dispatchEvent(new CustomEvent(“typo3:pagetree:refresh”));
top.TYPO3.Backend.ContentContainer.refresh();
if (savedRecordTitle !== “”) {
// show notification with title
}
}

Reviews 1

History 35

  1. Garvin Hicking changed category 04/01/26, 15:33

  2. Gerrit Code Review pushed patch set 1 for main to change 93515 status New Under Review 04/01/26, 15:48

  3. Gerrit Code Review pushed patch set 2 for main to change 93515 04/01/26, 16:02

  4. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % 04/02/26, 04:55

    Applied in changeset commit:1d9151980a72fe6e24b0e90a54c5a014ee02f0f5.

  5. Benni Mack changed status Resolved Closed 04/21/26, 11:30