DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: News RSS Importer

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Xavier Perseguers
Changed:2013-06-21T13:34:43
Classification:ttnews_rss_import
Description:The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ----
Keywords:tt_news, rss, feed, import
Author:Steffen Kamper
Email:info@sk-typo3.de
Info 4:
Language:en

img-1 img-2 EXT: News RSS Importer - ttnews_rss_import

EXT: News RSS Importer

Extension Key: ttnews_rss_import

Language: en

Keywords: tt_news, rss, feed, import

Copyright 2000-2012, Steffen Kamper, <info@sk-typo3.de>

Copyright 2013, Xavier Perseguers <xavier@typo3.org>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: News RSS Importer 1

`Introduction 3 <#__RefHeading__29222_394025407>`_

What does it do? 3

Screenshots 3

`Users manual 7 <#__RefHeading__29228_394025407>`_

`Administration 8 <#__RefHeading__29230_394025407>`_

Wizard 8

Scheduler 9

`Configuration 10 <#__RefHeading__29236_394025407>`_

`Known problems 11 <#__RefHeading__29238_394025407>`_

Getting an error while retreiving and RSS feed 11

Logfile is not created / updated 11

tt_news record creation fails when executed from scheduler 11

`To-Do list 12 <#__RefHeading__29246_394025407>`_

`ChangeLog 13 <#__RefHeading__29248_394025407>`_

Introduction

What does it do?

The extension imports any RSS feed to tt_news records. Assigned categories will be created automatically.

Screenshots

img-3

img-4

img-5

img-6

img-7

img-8 img-7 img-9

Users manual

Install the extension. Create a new record for the import, all configuration can be done in the record form.

Administration

Wizard

As your feed records may reside in different sysfolders, there is a wizard to see all records. You find it under web > functions:

img-10

Make sure you click on first page of your page tree (best choice)

You can edit, simulate import or import from here manually. You will see all output, with protocol you see complete arrays like in the wizard of the records.

Scheduler

If you want to run a cronjob for updating your feeds you cam do this with scheduler. Make sure to read the manual of scheduler how to setup a cronjob for automatic execution.

Now you can create a task for scheduler:

img-11

Also make sure sure the _cli_scheduler user is located in a group that has rights to create tt_news and tt_news_cat record and make sure the group has access to the folders it should be writing into. See tt_news records creation fails when executed from scheduler in section Know Problems of this document for more details.

You can specify the uid's of the records by using comma list (eg 1,4,5,6) or simply leave it empty (*) for updating all feed records. All actions will be written to log which is by default fileadmin/rssimport.log.

For viewing the log I recommend extension reports_logview:

img-12

Configuration

You can configure defaults in pageTS or userTS with the key “mod.ttnew_rss_import”

newCategoryParentId

Property

newCategoryParentId

Data type

int

Description

Define the parent category for new created categories from feed

Default

storagePid

Property

storagePid

Data type

int

Description

Define the storage Pid for new created news records

Default

categoryStoragePid

Property

categoryStoragePid

Data type

int

Description

Define the storage Pid for new created news categories

Default

defaultCategories

Property

defaultCategories

Data type

String

Description

Comma-seperated list of default categories which will be assigned to new created news records

Default

mapping

Property

mapping

Data type

Array

Description

Array of tt_news record fields and feed item fields. Syntax is

tt_news-field = rss-field

There is the possibility to map more than one field to a tt_news field with “|”. Example: the author can be rss-field “dc:creator” or “author”. Mapping is done by

author = dc:creator|author

In addition, you may specify a string to be used as this:

author = dc:creator|author|”Some name”

Default

mapping {
   title = title
   links = link
   datetime = pubDate
   author = dc:creator|author
   bodytext = content:encoded
   ext_url = guid|link
}

default.tt_news

Property

default.tt_news

default.tt_news_cat

Data type

Array

Description

Default values for new created news / news category items

Example:

mod.ttnew_rss_import {
   default.tt_news {
      type = 2
  }
   default.tt_news_cat {
      description  = Imported from RSS feed
  }

}

Default

[mod.ttnew_rss_import]

All of these settings can be done in the record form as well except the default.tt_news / default.tt_news_cat .

Known problems

Getting an error while retreiving and RSS feed

While trying to fetch an RSS file using the “Test XML feed” button, the following error shows up in the Source textarea of my ttnews_rss_import record:

ERROR: The input content failed XML parsing: Line 1: Invalid document end

Solution : set $TYPO3_CONF_VARS['SYS']['curlUse']=0 in typo3 configuration or try to tweak your CURL settings if you have to keep CURL enabled.

Logfile is not created / updated

The extension does not create the logfile automatically. If you want to make use of the logfile for verifying scheduler task is running ok, you will have to create the log file manually (default location is fileadmin/rssimport.log and can be adjusted in extension options) and you must make sure the file is writable by user apache.

tt_news record creation fails when executed from scheduler

This is a configuration issue with your installation :

Here is the solution :- create a usergroup with access rights and mountpoints you need- give access to pages with module 'access' to this user group as you would for any 'normal' backend usergroup using the access permissions module --> VERY IMPORTANT- add user _cli_scheduler to this usergroup

A good way to test your setup is to use the User Admin module to switch to the _cli_scheduler user. This way you will be able to see:- whether you have access to the storage of your records at all- whether you can edit or create the expected records in this storage.

To-Do list

No To-Dos now.

ChangeLog

  • Fixed : user defined mapping in ttnews_rssimport record was ignored
  • Added RSS encoding autodetection in a reliable way : the encoding is extracted from the <?xml version='1.0' encoding='UTF-8'?> tag from the RSS file

13