Issue Bug Closed

#85562TCA 'flex' set new records failed!

Loon Buster 07/14/18, 22:45 updated 10/23/23, 11:33

Description

Hello.

set-up a new record with ‘flex’ failed.

tca

['columns']['flexform'] => [
    'exclude' => 0,
    'displayCond' => 'FIELD:flexform_pointer:REQ:TRUE',
    'label'    => '',
    'config' => [

        'type' => 'flex',
        'ds_pointerField' => 'flexform_pointer',

    ]
],

error

#1478113873: Incomplete "record" based identifier: {"type":"record","tableName":"tx_myext_table","uid":0,"fieldName":"flexform_pointer"}

RuntimeException thrown in file
[..]/typo3_src-8.7.17/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php in line 650.

FlexFormTools.php

if (empty($identifier['tableName']) || empty($identifier['uid']) || empty($identifier['fieldName'])) {
    throw new \RuntimeException(
        'Incomplete "record" based identifier: ' . json_encode($identifier),
        1478113873
    );
}

if the record is new the uid is “0” and empty is true ..

.loon

Reviews 0

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

History 3

  1. Susanne Moog changed target version 09/06/18, 14:55

  2. Christian Kuhn changed category 09/30/18, 20:20

  3. Christian Kuhn commented and changed status New Closed 10/23/23, 11:33

    I think this is a TCA misconfiguration: ds_pointerField should pick the value from the referenced field, and then look up the according data structure in the ‘ds’ array. You did not specify a ‘ds’ array, so the system thinks you’re trying to configure a ‘record’ and not a ‘tca’ lookup. Add a ‘ds’ array configuration, and it should work.

    I hope it’s ok to close here.