[TYPO3-english] External Import extension: importing XML - records are not update with disabledOperations => ' '
Bert Hiddink [BENDOO e-work solutions]
hiddink at bendoo.nl
Wed Aug 20 12:47:25 CEST 2014
Hello,
Besides the duplication error, I try to also import categories from the
XML into the related table for News from the RSS <category>-tag:
<pubDate>Sat, 16 Aug 2014 12:00:00 +0200</pubDate>
<category>6</category>
<category>3</category>
<category>4</category>
<category>5</category>
...where the tag contains the ID of the associated category...
I came up with this:
//Categories
//Table: sys_category_record_mm
$GLOBALS['TCA']['sys_category_record_mm']['ctrl']['external'] = array(
0 => array(
'connector' => 'feed',
'parameters' => array(
'uri' => 'http://localhost/fileadmin/res/rss10.xml'
),
'data' => 'xml',
'nodetype' => 'item',
'reference_uid' => 'uri',
'enforcePid' => FALSE,
'priority' => 200,
'disabledOperations' => '',
'description' => 'Import of typo3.org news categories'
),
);
$GLOBALS['TCA']['sys_category_record_mm']['columns']['category']['external']
= array(
0 => array(
'field' => 'category'
)
);
$GLOBALS['TCA']['sys_category_record_mm']['columns']['parent'] = array(
'config' => array(
'type' => 'passthrough',
),
'external' => array(
0 => array(
'field' => 'category',
'mapping' => array(
'table' => 'tx_news_domain_model_news',
'reference_field' => 'tx_externalimporttut_externalid'
)
)
)
);
I get the following error then:
SQL error: 'Unknown column 'pid' in 'field list''
(sys_category_record_mm:NEW_1)
Column 'pid' does indeed not exist in 'sys_category_record_mm' but what
would be a proper set-up then?
Any suggestions?
Thanks again!
Bert
On 20-08-14 12:40, Bert Hiddink [BENDOO e-work solutions] wrote:
> Hello Francois,
>
> I just did a fresh install of TYPO3 6.2.4 with the TYPO3 Bootstrap
> Introduction package and installed News together with the Connector
> extensions.
> Then I followed your tutorial and added the code below to ext_tables.php
> of News extension...
>
> Then I ran the import but items still got duplicated...all items get the
> same tstamp and crdate and the field tx_externalimporttut_externalid
> exists but remains empty...
>
> Any further ideas?
>
> Thanks in advance!
>
> Regards,
> Bert
>
>
>
> On 18-08-14 18:14, Bert Hiddink [BENDOO e-work solutions] wrote:
>> Hello Francois,
>>
>> Thanks for your reply...News records get duplicated every time I run the
>> task from the BE.
>>
>> Any ideas?
>>
>> Thanks and regards!
>> Bert
>>
>> On 18-08-14 17:28, François Suter wrote:
>>> Hi Bert,
>>>
>>>> I'm testing this extension for a specific project. Following the great
>>>> tutorial, when testing with a RSS-feed (news from TYPO3.org), news
>>>> items
>>>> are re-inserted instead of updated.
>>>
>>> I quickly tested and I don't have the same behavior. This is really
>>> weird. Are the existing records deleted? Or do you accumulate
>>> duplicates?
>>>
>>> Cheers
>>>
>>
>
More information about the TYPO3-english
mailing list