Issue Bug Resolved

#111493FormEngine: content types are not updated after changing the column of a content element

Benjamin Kott 11/18/26, 17:01 updated 11/18/26, 19:45

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

  1. Configure a backend layout with two columns, e.g. colPos 0 without restrictions and colPos 1 with allowedContentTypes = header,text
  2. Assign it to a page and create a content element of type “Header” in colPos 0
  3. Edit the element and switch “Column” to colPos 1: the “Type” list still offers all types of colPos 0
  4. 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

  1. Benjamin Kott commented and changed status Under Review Resolved done 0 % 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.