Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem
Views doesn't add pubDate
and lastBuildDate
channel properties when using views_plugin_style_rss
.
These properties are optional - so it is not a bug in general.
But it becomes a problem in case of using MailChimp for example: their RSS-driven campaigns require pubDate
channel property.
Solution
Why don't we add such properties? It could be useful feature.
I am working on a patch.
Comment | File | Size | Author |
---|---|---|---|
#1 | views_rss-2034863-add_channel_properties_pubdate_and_lastBuildDate-1.patch | 3.69 KB | PatchRanger |
Comments
Comment #1
PatchRanger CreditAttribution: PatchRanger commentedHere we go! Please review.
Comment #2
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedViews RSS module does provide both those elements (pubDate and lastBuildDate) for the feeds it generates. If you want to have them in feeds generated by Views too, I'd say you should either create a patch for Views module, or write your own extension module which would add this functionality. I'm definitely not going to add it here, sorry.
Comment #3
PatchRanger CreditAttribution: PatchRanger commentedThanks for quick answer.
I would agree with you if there is not a circumstance: to add this to Views itself, we need to move the way how Views RSS determines which field is responsible for
pubDate
to Views too (see views_rss_core_views_rss_date_sources). Or implement a copy of it - which is definitely not a option, right?So in my view it is the best way: use the power of Views RSS to extend default Views behavior, since it can't be extended alone (without duplication).
Let me re-open it. What do you think?
Comment #4
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedI see where you're coming from, and understand your reasoning, the thing is though that this feature is out of scope of this module. This modules provides an alternative way of generating feeds, it is not meant to "fix" what Views has to offer. Hence my original "won't fix" decision. At the same time I realize pushing it to Views might prove difficult (although I don't see any reason why someone couldn't work on this), and that's exactly why I suggested writing a separate module. And no, I don't think that implementing a copy of views_rss_core_views_rss_date_sources() is going to be an issue there, as Views RSS/the new module would be actually mutually exclusive, at least in normal circumstances - no logic in using feeds generated by Views and by Views RSS at the same time.
Comment #5
PatchRanger CreditAttribution: PatchRanger commentedOk, here is the issue opened for Views with patch attached: #2037185: Display pubDate and lastBuildDate channel properties for views_plugin_style_rss style.