Issue Bug Closed

#88456Creating a record with read-only fields loses their default values

Michael Stucki 05/29/19, 17:10 updated 09/29/20, 15:07

Description

Assuming that tt.content.CType should not be changed by editors:

    TCEFORM.tt_content.CType.config.readOnly = 1

With this configured, new content elements loose their CType setting after being saved.

Steps to reproduce:

  1. Set tt_content.CType as readOnly like explained above
  2. Create a new content element via element wizard and choose a CType which is not the 1st in the list
  3. This opens an edit form with the correct CType selected, but marked as read-only
  4. When hitting the save button, the CType info is lost and cannot be changed again.

Note: The “readOnly” option for TCA fields affects only the display. As the documentation mentions, it is still possible to write to those fields when using the DataHandler: https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Select.html

Reviews 2