No output for Content: Changed in RSS feed

Created on 19 March 2024, about 1 year ago

Problem/Motivation

The "last edited" date is essential in order to know whether or not the node has been updated since the last download. "Content: Changed" provides this information. It displays in block or page. The RSS feed shows nothing.

Steps to reproduce

Create a page or block node view and add the "Content: changed" field. Duplicate as a RSS feed. Note that the "Content: Changed" info is visible on page or block, but nothing is output for RSS. (Settings: Show Content, display type RSS.)

Proposed resolution

Figure out why information isn't getting to the RSS feed.

Any suggestions greatly appreciated!

πŸ› Bug report
Status

Active

Version

10.2 ✨

Component
ViewsΒ  β†’

Last updated 34 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bcobin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bcobin
  • The steps to reproduce need to be more fully fleshed-out. I don't quite think this is a bug because by going beyond the steps to reproduce, I can't reproduce. In fact now that I have all the details I don't think this is a bug at all.

    When you copy a page display into a field type, it defaults to the "Content" format, which will use certain visible fields. To modify the RSS display, you switch to the "Fields" format, and select which content fields to assign to the prescribed RSS attributes. When I do that I can definitely see the changed date..

  • πŸ‡ΊπŸ‡ΈUnited States bcobin

    Thanks so much for the response. I'm using the feed to populate another site and there's specific data I need to output that doesn't correspond to what I assume to be the typical RSS feed. The row style options in fields (e.g. Content: Title, Link, Creator, etc.) are irrelevant for my use case and there's no provision for the data I need to include.

    The configuration that outputs what I need is:

    Format:

    RSS Feed | RSS Feed
    Settings: Force using fields

    Show:

    Content | Content
    RSS | RSS

    In this configuration, everything outputs perfectly except for the Content: Changed feed item, which doesn't appear at all. I only mentioned converting the display from page to feed to save a step; I suppose I should have clarified that the problem happens not in all configurations, but in the specific configuration I need to use.

    Does this help? Thank you so much for taking the time - I am really stuck here, so any ideas are greatly appreciated!

    (Happy to send you a like to the feed privately...)

  • πŸ‡ΊπŸ‡ΈUnited States bcobin
  • You should probably get really specific about exactly what you expect in RSS output, including an XML example, to get some help with this.

  • πŸ‡ΊπŸ‡ΈUnited States bcobin

    The actual feed is accessible here:

    https://d1024.suffolkcountydems.com/feed/officeholder/shelter

    The "last-updated" field is one that I added manually this morning as a workaround to the problem. (It's the last field in the feed.)

    The site admins will now need to manually update the new field whenever they make a change so that the target site will know what nodes need updating. It's an extra step I'll need to ask them to do and something that could easily be missed; if the "content: change" field was being output, all they would need to do is make the desired node change(s) and that would be that.

    Thanks, @cilefen, for continuing to circle back on this. Much appreciated.

  • You may be better off in the #support channel in Slack.

  • πŸ‡ΊπŸ‡ΈUnited States bcobin

    Thanks, @cilefen - the most recent post in Slack DrupalNYC is two months old and I have no idea how to use Slack anyway. I assume there's an overall Drupal Slack channel, but I have no way to get to it nor how to use Slack, as I mentioned.

    I'll leave this open for now and hope someone comes along who might have an idea what I can do next... thanks...

  • πŸ‡·πŸ‡΄Romania bbu23

    I looked into this, had it done locally, looked at the code in modules/views/src/Plugin/views/row/RssFields.php and I think it is intended this way because of the RSS documentation. There seems to be no updated field in RSS specs: https://www.rssboard.org/rss-specification#hrelementsOfLtitemgt, therefore Drupal does not add it which seems to be correct. Drupal only uses the publication date field, which again looks good.
    I think this is working as expected in the Drupal side.

  • It's not a bug. The OP is apparently asking how to create an irregular RSS feed with Drupal views.

  • πŸ‡ΊπŸ‡ΈUnited States bcobin

    Thank you both for your attention to this. (And @cilefen, thanks so much for the Slack guidance!)

    There are plenty of working fields in my custom feed that aren't in the RSS spec, so I don't see why it's only the last-updated field that doesn't work, especially insofar as it's working in the page/block views. (Yes, and I know those views aren't RSS.) I'd suggest that if the RSS spec is the reason the data won't display, the field shouldn't be made available as an option in the first place. But that's neither here nor there.

    The publication date field won't work; it doesn't change upon node edit. So I suppose what I need is either:

    1. A way to output the last-edited field in the feed, or...

    2. A way to have the name-created field use the last-edited data instead.

    Custom module? Patch? I have no idea, but I'm willing to talk about what it might take.

    Thanks again for your guidance here!

  • Status changed to Closed: works as designed 4 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    @bcobin, I hope you have made more progress on this problem.

    As stated by two other contributors this isn't something that can be fixed in Drupal core. This has been open for 10 months without any discussion, so I am closing this issue.

Production build 0.71.5 2024