Problem/Motivation

Most of the feeds I have been usig so far have been GitHub releases.atom, which only have updated datetimes.

Now I'm looking at https://librazik.tuxfamily.org/dotclear/blog/?feed%2Fatom which has both published and updated tags.

I have a mapping to "Release Date (field_releasedate)" from "Published date" (though the GH feed seems to fallback to the updated tag).

But this doesn't pick up the published tag in the new feed. I've also specificaly added a new 'published' source and mapped that to a datetime, just in case, but that doesn't work.

Am I missing something? Thanks.

Comments

mxmilkiib created an issue. See original summary.

megachriz’s picture

Title: published vs updated timestamp mappings » published vs updated timestamp mappings in atom feed
Category: Support request » Feature request
Status: Active » Needs review
StatusFileSize
new6.04 KB

It looks like Feeds ignored the <published> tag. It only picked the <updated> apparently:

if ($date = $entry->getDateModified()) {
  $item->set('timestamp', $date->getTimestamp());
}

Attached patch adds a new mapping source called "Updated date". I already tested what the value was for RSS feeds. There it just picks the published date, which is good. Patch also has tests.

  • MegaChriz committed 866da77 on 8.x-3.x
    Issue #3178855 by MegaChriz: Added support for parsing "updated"...
megachriz’s picture

Status: Needs review » Fixed

Committed #2.

Status: Fixed » Closed (fixed)

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