3
votes

I am using TYPO3 7.6.11. I wrote an provider extension to add some ts-code, templates, and viewhelpers. After that, I wanted to add a custom data record (to use in the Backend).

I added the table in the ext_tables.sql. I have a TCA-config under /[extension]/Configuration/TCA/tablename.php

I added

TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tablename');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tablename');

to my ext_tables.php

Did I miss something?

I get a new record type under "System Records" in the List Module. I can add such an record, and the TCA-config seems to work fine for the record form.

But after saving, I have no record in the list view. The DB is looking fine. The record is saved correctly in my new table. What am I doing wrong? Thanks

Edit: crtl:

'ctrl' => array (
    'title' =>       'LLL:EXT:svkcore/Resources/Private/Language/locallang.xlf:records.title',
    'label' => 'title',
    'label_alt' => '',
    'label_alt_force' => TRUE,
    'default_sortby' => 'ORDER BY datetime DESC',
    'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
    'versioningWS' => TRUE,
    'versioning_followPages' => TRUE,
    'origUid' => 't3_origuid',
    'shadowColumnsForNewPlaceholders' => 'sys_language_uid,l18n_parent,starttime,endtime,fe_group',

    'dividers2tabs' => TRUE,
    'useColumnsForDefaultValues' => 'type',
    'transOrigPointerField' => 'l18n_parent',
    'transOrigDiffSourceField' => 'l18n_diffsource',
    'languageField' => 'sys_language_uid',
    'crdate' => 'crdate',
    'tstamp' => 'tstamp',
    'delete' => 'deleted',
    'type' => 'type',
    'cruser_id' => 'cruser_id',
    'editlock' => 'editlock',
    'enablecolumns' => array (
        'disabled' => 'hidden',
        'starttime' => 'starttime',
        'endtime' => 'endtime',
        'fe_group' => 'fe_group',
    ),
    'typeicon_column' => 'type',
    'typeicons' => array (
        '1' => 'EXT:svkcore/res/gfx/svkcore_inturl.gif',
        '2' => 'EXT:svkcore/res/gfx/svkcore_exturl.gif',
    ),
    'thumbnail' => 'image',
    'iconfile' => 'EXT:svkcore/res/gfx/ext_icon.gif',
    'searchFields' => 'uid,title,short,bodytext'),
'interface' => Array (
    'showRecordFieldList' => 'title,hidden,datetime_start,starttime,archivedate,category,short,image,record_files'
),
2
Is the pid of the record also saved correctly?lorenz
Yes the pid in the DB is correctRanzigeMilch
Don't you have a 'hideTable' => true, in ctrl section of TCA definition of your table?Viktor Livakivskyi
Could you please update your question with the TCA configuration. If you can create a new record, save it and see it in the database but not in TYPO3 then it seems like you have a TCA configuration issue - it could be hideTable in the CTRL section as Victor points outLasse
I added the crtl part. I generally adopted the configuration from tt_news.RanzigeMilch

2 Answers

1
votes

Since Typo3 7 it is possible to mask the list-view. This is configured via PageTSConfig, have a look at your info-Module (select the correct page in the page tree) and check the TSConfig there.

The configuration can be found in the following path:

mod.web_list.allowedNewTables
0
votes

Check in ext_tables.php if you have everything needed for your new table : Typoscript inclusion, language file, exemple :

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'My TS configuration');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_myext_domain_model_mytable', 'EXT:my_ext/Resources/Private/Language/locallang_csh_tx_myext_domain_model_mytable.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_myext_domain_model_mytable');

Are you sure the new records are stored in the current page : have a look at the TS "persistence.storagePid". You can check in the database wich pid is used for your new records.

Regards, Florian