cobwebch/external_import

news and eventsnews datetime conflicts by mapping

Closed this issue · 2 comments

lgt commented

Hello,

I'm facing the following Problem. I'm about to migrate Typo3 v4 news and events to v10. I already declared the dependencies in ext_emconf in my custom importer extension to map the required fields as it follows:

$EM_CONF[$_EXTKEY] = [
    'title' => 'Import',
    'description' => '',
    'category' => 'plugin',
    'author' => 'pg',
    'author_email' => 'info@test.com',
    'state' => 'alpha',
    'clearCacheOnLoad' => 0,
    'version' => '1.0.0',
    'constraints' => [
        'depends' => [
            'templates_provider' => '1.0',
            'external_import' => '5.1',
            'svconnector_csv' => '2.4',
            'svconnector_feed' => '2.4',
            'svconnector_sql' => '2.3',
            'typo3' => '10.4.21',
            'news' => '8.5.2-8.9.99',
            'eventnews' => '4.0',
        ],
        'conflicts' => [],
        'suggests' => [],
    ],
];

Than I try to map the datetime field in different groups

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['datetime']['external'] = [
    'events' => [
        'field' => 'start_date',
        'userFunction' => [
            //needs transformation
        ]
    ],
];

this will show correctly under the Columns Mapping

but the other datetimes which are related just to the news will be suppressed and are not getting mapped anymore. Can somebody give me some hints how to proceed in this case

$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['datetime']['external'] = [
    'publications' => [
        'field' => 'datetime',
    ],
    'newsletter' => [
        'field' => 'datetime',
    ],
    'projects' => [
        'field' => 'datetime',
    ],
    'aktuelles' => [
        'field' => 'datetime',
    ]
];

Many thanks

Hi. It's a bit hard to say without seeing your whole code. You said you took care of the dependencies, but it still looks like a loading order problem. Have you verified the full TCA for the tx_news_domain_model_news with the Core's Configuration module? Do you see your External Import mappings there? If not, it means something is overriding your additions to the TCA. I hope this helps a bit.

lgt commented

Hi thank you for your Feedback, I could fix this! $GLOBALS['TCA']['tx_news_domain_model_news']['columns']['datetime']['external'] has been in override