Issue Feature Closed

#95460Add "eval" to allowOverrideMatrix

Robert von Hackwitz 10/04/21, 10:11 updated 12/11/24, 16:15

Description

Currently it is possible to change the configuration of a field through TSConfig only for these values ​​contained in the allowOverrideMatrix of FormEngine.

    protected static $allowOverrideMatrix = [
        'input' => ['size', 'max', 'readOnly'],
        'text' => ['cols', 'rows', 'wrap', 'max', 'readOnly'],
        'check' => ['cols', 'readOnly'],
        'select' => ['size', 'autoSizeMax', 'maxitems', 'minitems', 'readOnly', 'treeConfig'],
        'group' => ['size', 'autoSizeMax', 'max_size', 'maxitems', 'minitems', 'readOnly'],
        'inline' => ['appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly'],
        'imageManipulation' => ['ratios', 'cropVariants']
    ];

I think it would be useful if it were also possible to change the “eval” value through TSConfig

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Benni Mack commented and changed status New Rejected <span data-processor="relativetime" data-value="2024-12-11T16:12:39+00:00" > 12/11/24, 16:12 </span>

    Hey robert,

    unfortunately, this is something we won’t do. Because “eval” has not only influence on FormEngine but should have influence in DataHandler, this isn’t overridden there as well and not evaluated. Thus, one could still use other values when sending content directly to FormEngine without UserTSconfig/PageTSconfig being completely evaluated.

    I hope you understand. Thanks! If you have any further questions, let me know and reach out to me.
    Benni.

  2. Oliver Bartsch commented and changed status Rejected Closed <span data-processor="relativetime" data-value="2024-12-11T16:15:23+00:00" > 12/11/24, 16:15 </span>

    Hi Robert,

    thanks for creating this feature request. After some consideration I unfortunately have to close this for the following reasons:

    1. allowOverrideMatrix was initially introduced to allow changing of display related TCA options only. The fact that this got somehow extended in this regard (e.g. for type inline – is unfortunate).
    2. The eval option is not display related but has impact on validation and persistence in the DataHandler. We can not always ensure, that the DataHanlder applies TSconfig to records, thus eval might differ on this fact. Such change will therefore surely lead to a couple of consequential errors.
    3. Since a couple of versions we are actually about to reduce eval by introducing dedicated TCA types.
    4. Because allowOverrideMatrix is not the best API, we actually should focus on building a better API for such configuration instead of extending it further.

    We truly appreciate your input and hope you understand this decision.

    Thank you once again, and all the best,
    Oli