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.
Hi,
Im using custom field for pubdate, but it doesnt show.
I noticed in my RSS I have this instead:
I use this setting inside the Fields :
Formatter : Date and Time
Choose how users view dates and times: RSS - I use custom RSS format.
Please advise.
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#10 | rss-date.JPG | 26.39 KB | KennyDiggins |
#2 | FireShot Screen Capture #096.png | 13.77 KB | shadowdknight |
Comments
Comment #1
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedIn the module documentation's Setting up core <item> elements it is explained that date in
<pubDate>
element should be formatted in line with RFC 2822 document.In RSS specification you can see example format of a date in the feed:
You need to make sure that you configure your field to output the date in exactly this format. If you can use custom date settings, use PHP's
r
format character.Comment #2
shadowdknight CreditAttribution: shadowdknight commentedHi,
Thank you for time looking into this,
I understand that Content: Post date (Post date) has custom date,
but when I use custom field, and select RSS custom server.
Please see attached image.
Thanks
Comment #3
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedThe attached image does not work (probably because of the spaces in the file name). Anyway, whatever your field is, you need to make sure that it returns the date in the correct format, as mentioned above, otherwise it will not work properly. If your field does not provide you the custom format option, I guess you could try to play with "Rewrite the output of this field" option, or use custom feed element preprocess function.
Comment #4
4Elemental CreditAttribution: 4Elemental commentedI'm not sure this is actually behaving as intended. I think shadowhitman may have just dropped the thread. I am seeing the same behavior. Instead of using Node: Post date as indicated in the documentation, I am using a custom date field. So, I created a custom date format named RSS and set the field display format to RSS. It displays the date in the proper format but it is doubled in this fashion (Wed, 14 Mar 2012 08:00:00 +0800 Wed, 14 Mar 2012 08:00:00 +0800) so it isn't recognized by RSS readers. It only occurs once when using a different date format and it works fine when using Node: Post date. The custom date field had the "Default value for To date: " set as "Same as From Date," and I tried changing it to "Blank" and then manipulating some content but that didn't fix it. "To Date" was also set to "Never" under "Global Settings." I tried the "Rewrite" option and that didn't work. I will look into the pre-process function. Let me know if you have any leads. Thank you.
Comment #5
drwits CreditAttribution: drwits commentedas mentioned above by 4elemental...
I can use the r format with post date but not with a custom date. it prints it twice. i tried using D, M d Y G:i:s O as a custom date format as well but it leaves out the seconds. would love to find a solution to this!!
thanks for the great module.
Comment #6
4Elemental CreditAttribution: 4Elemental commentedIs this module actively maintained? No one is answering questions.
Comment #7
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedWell, it does behave as intended, as it was developed to use Content: Post date for
<pubDate>
element, not something else.If it doesn't output dates coming from Date type field in the correct format, I guess this issue should be a feature request then - and in such case obviously patches are welcome (standard procedure with feature requests).
if no-one provides the patch I could add this feature myself once I get some free time to work on this again (which I'm sort of short of recently) and most probably after solving other, more important issues.
Comment #8
4Elemental CreditAttribution: 4Elemental commentedOkay, I guess that it behaves in the way you intended, which makes sense, but it kind of defeats the purpose of being able to use custom fields when you can only use one particular thing for the
<pubdate>
but can use any custom field for other RSS items. The items that we are trying to use are of a Date type field and are using a date format of r. So, I don't see why they wouldn't work. Technically, they do work, they just output the data twice.I will try to make time to look at the code and thanks in advance for any help you can provide.
Thanks again for the great module. This functionality really should be inherent in Views.
Comment #9
alodien CreditAttribution: alodien commentedJust wanted to add that I would love to see this change, as well. I haven't had the chance to dig in to the module itself to see how hard it would be to change, but for the current site I am working on it would be extremely useful.
Comment #10
KennyDiggins CreditAttribution: KennyDiggins commentedI was able to get this working using the r format with following additional options
Formatter: Plain
Display: Start date only
I hope this helps.
Comment #11
maciej.zgadzaj CreditAttribution: maciej.zgadzaj commentedClosing after long time of no activity.