#111493FormEngine: content types are not updated after changing the column of a content element
Description
Problem
Since #108623 a backend layout column can restrict the content types it accepts (allowedContentTypes, disallowedContentTypes). The edit form of a content element reduces the “Type” (CType) items to the types allowed in the column of the record. When the editor changes the “Column” (colPos) field, the form is not reloaded, so CType keeps offering the types of the old column:
- types that only the new column allows are not offered;
- a type that only the old column allows can still be chosen. Choosing it reloads the form, which saves the record; the restriction hook refuses the record for the new column, so the whole save is dropped, including all other changes, and only a log entry tells why.
Steps to reproduce
- Configure a backend layout with two columns, e.g. colPos 0 without restrictions and colPos 1 with allowedContentTypes = header,text
- Assign it to a page and create a content element of type “Header” in colPos 0
- Edit the element and switch “Column” to colPos 1: the “Type” list still offers all types of colPos 0
- Switch “Type” to a type colPos 1 does not allow, e.g. “Bullet List”: the reload saves, the record is refused for colPos 1 and all changes of the form are lost
Cause
TcaTtContentCtypeItemsRestrictionByBackendLayout builds the CType items from the colPos of the record, but colPos neither is the type field nor has onChange = reload, so SingleFieldContainer adds no reload to it. The inverse direction (colPos items by CType, TcaTtContentColPosItemsRestrictionByBackendLayout) works, because CType is the type field and reloads.
Reviews 2
History 16
-
Gerrit Code Review pushed patch set 1 for main to change 97795 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-18T17:03:17+00:00" > 11/18/26, 17:03 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 97800 <span data-processor="relativetime" data-value="2026-11-18T18:26:51+00:00" > 11/18/26, 18:26 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 97800 <span data-processor="relativetime" data-value="2026-11-18T18:49:46+00:00" > 11/18/26, 18:49 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 97795 <span data-processor="relativetime" data-value="2026-11-18T19:08:01+00:00" > 11/18/26, 19:08 </span>
-
Gerrit Code Review pushed patch set 3 for 14.3 to change 97800 <span data-processor="relativetime" data-value="2026-11-18T19:08:04+00:00" > 11/18/26, 19:08 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-18T19:45:12+00:00" > 11/18/26, 19:45 </span>
Applied in changeset commit:070f51c0bfa84e94b714598bfa7fc01fd91598c7.