Hello Francois,
This is a snippet of the code I used (mentioned earlier) added to
ext_tables.php in "News"-ext:
//BENDOO custom
//ALTER TABLE `tx_news_domain_model_news` ADD
`tx_externalimporttut_externalid` VARCHAR(300) NOT NULL ;
$GLOBALS['TCA']['tx_news_domain_model_news']['ctrl']['external'] = array(
0 => array(
'connector' => 'feed',
'parameters' => array(
'uri' =>
'http://typo3.org/xml-feeds/rss.xml'
),
'data' => 'xml',
'nodetype' => 'item',
'reference_uid' =>
'tx_externalimporttut_externalid',
'enforcePid' => TRUE,
'disabledOperations' => '',
'description' => 'Import of typo3.org news'
),
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['title']['external']
= array(
0 => array(
'field' => 'title'
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['tx_externalimporttut_externalid']['external']
= array(
0 => array(
'field' => 'link'
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['datetime']['external']
= array(
0 => array(
'field' => 'pubDate',
'userFunc' => array(
'class' =>
'EXT:external_import/samples/class.tx_externalimport_transformations.php:tx_externalimport_transformations',
'method' => 'parseDate'
)
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['teaser']['external']
= array(
0 => array(
'field' => 'description',
'trim' => TRUE
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['bodytext']['external']
= array(
0 => array(
'field' => 'encoded',
'rteEnabled' => TRUE
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['type']['external']
= array(
0 => array(
'value' => 0
)
);
$GLOBALS['TCA']['tx_news_domain_model_news']['columns']['hidden']['external']
= array(
0 => array(
'value' => 0
)
);
//Related links
$GLOBALS['TCA']['tx_news_domain_model_link']['ctrl']['external'] = array(
0 => array(
'connector' => 'feed',
'parameters' => array(
'uri' =>
'http://typo3.org/xml-feeds/rss.xml'
),
'data' => 'xml',
'nodetype' => 'item',
'reference_uid' => 'uri',
'enforcePid' => TRUE,
'priority' => 210,
'disabledOperations' => '',
'description' => 'Import of typo3.org news
related links'
),
);
$GLOBALS['TCA']['tx_news_domain_model_link']['columns']['title']['external']
= array(
0 => array(
'field' => 'title'
)
);
$GLOBALS['TCA']['tx_news_domain_model_link']['columns']['uri']['external']
= array(
0 => array(
'field' => 'link'
)
);
$GLOBALS['TCA']['tx_news_domain_model_link']['columns']['parent'] = array(
'config' => array(
'type' => 'passthrough',
),
'external' => array(
0 => array(
'field' => 'link',
'mapping' => array(
'table' =>
'tx_news_domain_model_news',
'reference_field' =>
'tx_externalimporttut_externalid'
)
)
)
);
//BENDOO end custom
Thanks and regards,
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
_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english