I am being tasked with using an external RSS feed that does not correctly use the Author tag. Its values just contain a first and last name like this:
<author>John Smith</author>

After importing, the field remains blank.

I unfortunately do not have any control over the source RSS feed and cannot fix this.

I am using the RSS/Atom parser.

I have tried using "Author email", "Author name" and a custom source simply called "author" and none were able to parse the value.

What can be done about this?

CommentFileSizeAuthor
#6 feeds.feed_type.author_test.yml1.14 KBandrewmriv
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewmriv created an issue. See original summary.

MegaChriz’s picture

Category: Feature request » Support request
Status: Active » Fixed

Hm, if the RSS feed uses the <author> tag, then that should just work. <author> is in the RSS specification. Are you sure that you mapped the value correctly?

If you want to select elements from a RSS feed (or other XML files) that are beyond the RSS specification, you'll need to use the XML parser from Feeds extensible parsers.

Custom sources are ignored by the RSS parser. When using this parser, they are only useful for setting default values with Feeds Tamper.

andrewmriv’s picture

Hi MegaChriz thanks for the response.

I verified that it was mapped correctly but still does not work.

When modifying a test RSS file, the following did work with the "Author email" and/or "Author name" sources:

<author>john@smith.com</author>
<author>john@smith.com (John Smith)</author>

When I changed the RSS file back to the following, it stopped importing properly.
<author>John Smith</author>

Note: I was importing into a Body field for my test.

andrewmriv’s picture

Status: Fixed » Needs work
andrewmriv’s picture

Status: Needs work » Active
andrewmriv’s picture

I have attached a test Feed that can reproduce this error.
This Feed imports into the Article Content Type. The Author is mapped to the Body field.

You can also use the following 2 RSS feeds for testing:

The only difference between these files is Line 23.
RSS 1 has:
<author>John Smith</author>

RSS 2 has:
<author>John@smith.com (John Smith)</author>

I need Feeds to work with RSS 1 for my issue to be solved.