Using the Feeds Module for Drupal Imports

import content

If you’re moving to Drupal, there’s a good chance that you’ll need to import data.

The Feeds module is the most common way to import content and user data into Drupal.

In this tutorial, we’re going to answer a question from one of members, “How do I import RSS feeds into Drupal?” As we answer his question, we’ll give you an introduction to how the Feeds module works. whether you want to import from an RSS feed, a CSV file or another format.

Installing Feeds

media_1365518973276_1fef842fa58b851f2efdc4a8d8dc5888.png

To use Feeds, we need to install these 3 modules, Feeds, Features and Job Scheduler:

Enable all four boxes in the Feeds area:

media_1365519164951_31605c6aeb820388226c64c380510a39.png

Setting up Feeds

Our first step is create our import settings.

  • Go to Structure > Feeds importers
  • You’ll see that four default types of import are already set up: Nodes, Users, Feed and OPML.
  • Click “Add importer” in the top-right of the screen.
media_1365528694530.png
  • At the bottom of the screen you have the same options that you do for content types. By default, you can set up all your imported content with menu links, revisions, comments, authoring information and publishing options.
media_1365520059440_32b34a18194be1845515d64971864901.png
  • Enter a Name and Description for your import.
  • Click Create.
  • You’ll be taken to a screen with four areas on the left: Basic settings, Fetcher, Parser and Processor.
media_1365528759571.png
  • Click Settings next to Basic settings
  • Under Attach to content type, choose where you want to import your content. By default all content is imported to a content type called “Feed Item”.
  • Under Periodic import, choose whether this content will be imported regularly or just once.
media_1365528872260.png
  • Click Change next to Fetcher.
  • You can decide whether you’re importing from a file on your computer or from a URL (as with an RSS feed).
media_1365529043857.png
  • Click Change next to Parser.
  • This is a more detailed version of the Fetcher tab. Here you can decide exactly what import format you’d like to use:
media_1365529100520.png
  • Click Change next to Processor.
  • You can decide whether your import is going into nodes, users or taxonomies:
media_1365529720371.png
  • Click Settings next to Processor.
  • Here you can choose more detailed settings for your import:
media_1365529508554.png
  • Click Mapping next to Processor.
  • Here you can line up your data with your Drupal data structure. You can associate data from your RSS feed with the field ands information associated with yoru Drupal content. Fields will do a reasonable job of doing this if your contnet types are simple and have no fields, but if your content has fields, you will need to set up this mapping.
media_1365530709530.png

Using Feeds

Feeds is set up so that doing an import is very similar to adding a normal content item.

  • Click Add content.
  • Click Feed.
media_1365530364343.png
  • Enter the Title.
  • Enter the URL of the RSS feed you want to import.
  • Here you also get to choose all of the default content settings for the imported content:
media_1365530405671.png
  • Click Save.
  • You’ll see a progress bar as Drupal imports your content.
media_1365524798009_7fa861a4022638da7e54476a18c1d059.png
  • Check your site to validate the import. Your imported content really will be stored as actual nodes. If you want to import RSS feeds temporarily, try the Aggregator module.
media_1365524784109_26ca150e878c0acf461707beed9182a5.png

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

    View all posts
0 0 votes
Article Rating
Subscribe
Notify of
guest

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Johan
Johan
10 years ago

Thanks for the tutorial. I have followed it completely, however if I sellect Read More on the page I dont see the full article.

Guest
Guest
10 years ago

How do you get a source link to display?

Varsha Jain
Varsha Jain
10 years ago

Thanks for the tutorial!!! 🙂 It helped me a lot…

Çağlar Tolga Tetik
Çağlar Tolga Tetik
10 years ago

Thanks for this great tutorial. I followed all the steps and searched on many sites. But I cannot see the fields. Node is created, but it is empty. What can be the reason? Can you send a sample xml file?

Arturo Osorio
Arturo Osorio
9 years ago

lo mismo que los anteriores xD (:()

karen
karen
9 years ago

When I try and import a feed I get this error…

SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘pagination’ cannot be null
Any ideas on what I am doing wrong?

Thanks

Karen

hari
hari
5 years ago

if i want to add a image in drupal 8 in feed, please tell me the steps because i selected the feild but not able to reflect the hero image

7
0
Would love your thoughts, please comment.x
()
x