It looks like the current SyndicationParser.php only pulls in the item "Description' field which is essentially a summary of the content. There is no way to pull in the full content of the feed item. Attached is a patch which adds this field, using the following code:

Add to $item:
->set('content', $entry->getContent())

Add to 'getMappingSources()':

'content' => [
        'label' => $this->t('Content (Atom)'),
        'description' => $this->t('Content of the feed item.'),
        'suggested' => ['body'],
        'suggestions' => [
          'targets' => ['body'],
          'types' => ['field_item:text_with_summary' => []],
        ],
      ],
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariagwyn created an issue. See original summary.

mariagwyn’s picture

Issue summary: View changes
mariagwyn’s picture

MegaChriz’s picture

Status: Active » Needs review

Setting to "Needs review", so the testbot will evaluate the patch. (Note that there is one broken test currently in the 8.x-3.x branch, so 1 test failure may be ignored.)

Status: Needs review » Needs work

The last submitted patch, 3: feeds-add-rss-content-field-2641674-10702672-8x.patch, failed testing.

MegaChriz’s picture

I guess this breaks the test Drupal\Tests\feeds\Unit\Feeds\Parser\SyndicationParserTest. The test failure for Drupal\Tests\feeds\Unit\Feeds\Target\DateTimeTest is a know failure and can be ignored.

  • twistor committed 01ecad5 on 8.x-3.x authored by mariagwyn
    Issue #2641674 by mariagwyn, MegaChriz: Add field to SyndicationParser....
twistor’s picture

I did change from 'Content (Atom)' to 'Content' since the content element also applies to RSS. Our parser will even grab the description if the RSS item doesn't have a content element.

twistor’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.