RSS Feeds have invalid date

ntiostle - March 10, 2008 - 16:59
Project:Drupal
Version:5.x-dev
Component:node.module
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Hi!

The W3C feed validator says that:

Sorry

This feed does not validate.
line 16, column 40: pubDate must be an RFC-822 date-time: Mo, 10 Mär 2008 17:42:43 +0100 (30 occurrences) [help]
<pubDate>Mo, 10 Mär 2008 17:42:43 +0100</pubDate>

Obviously the date is being localized what is not RFC-822 conform. (Mär instead of Mar)

I will provide more information if needed!

Andreas

#1

Shnoulle - March 31, 2008 - 11:27
Version:6.0» 6.1

Same problem with 6.1 and french langage.

puDate had to be in EN .

(with rss feeder (Thunderbird, google, aggregator of drupal ...) All rss have the same date.)

rss.xml is OK, but not /blog/feed

Thank you

#2

ptilu8 - April 4, 2008 - 12:08

Same problem

Drupal6.1
French

Invalid PubDate format

rss.xml not OK

Thx

#3

macgirvin - April 4, 2008 - 12:51
Status:active» patch (code needs review)

Give this patch a try. I haven't tested it myself because I don't have any translations but theoretically it should fix the problem. It simply forces the date to be in English when filling in the pubDate field contents for the feed.

AttachmentSize
enrssdate.patch1.08 KB

#4

ptilu8 - April 4, 2008 - 14:43

Tested, seems ok for me...

#5

macgirvin - April 5, 2008 - 23:05

...If we can get one more person to test this, I'd be happy to bump it up a notch so that the change gets committed. As mentioned previously, I don't have the localisation framework to test it myself.

It's a quite serious bug for anybody not on an English default system; as all their feeds are non-validating and potentially unusable. It would be quite appropriate IMHO to mark it as 'critical'.

#6

hsiegel - April 9, 2008 - 16:02

Just tested this and it works for me (german language).

This patch should be added as soon as possible, as all 6.1 users seem to have the same issue with their rss-feeds if they changed their installation from english-default.

Thx

#7

Damien Tournoud - April 11, 2008 - 08:45

Hum. I don't really understand why there is not the same problem on Drupal 5. Could someone clarify that?

From node_feed() in Drupal 5:

array('key' => 'pubDate', 'value' => format_date($item->created, 'custom', 'r'))

... and format_date() does not support the $langcode argument, which has been added in Drupal 6.

#8

Damien Tournoud - April 9, 2008 - 17:13
Version:6.1» 7.x-dev
Priority:normal» critical

Oh, and (if confirmed) this is critical (it breaks the whole feed creation mecanism), and bugs should get corrected in the current development version, than back-ported.

#9

Dries - April 10, 2008 - 01:51
Status:patch (code needs review)» patch (code needs work)

The patch is not formatted properly and therefore won't apply. It needs to be re-rolled with proper line-breaking. Thanks.

#10

macgirvin - April 10, 2008 - 05:33
Status:patch (code needs work)» patch (code needs review)

Patch re-rolled - not certain how the lines got folded.

AttachmentSize
enrssdate2.patch1.05 KB

#11

flobruit - April 10, 2008 - 23:48

File was patching node.module.orig, which doesn't exist. Fixed in attached patch.

Besides the very long line of code (which was already there before), this looks good.

AttachmentSize
en_rss_date-232433-11.patch1.01 KB

#12

mfb - April 18, 2008 - 02:47

This is a critical bug for drupal 6.
Here's what I think is a more correct patch: the formatting has to be correct so we should use PHP date functions, not format_date().

AttachmentSize
d6.node_.pubDate.patch2.94 KB
d7.node_.pubDate.patch1.22 KB

#13

macgirvin - April 18, 2008 - 06:49

+1

I concur.

#14

mfb - April 18, 2008 - 19:12
Component:system.module» node.module

Fixing component.

#15

Dries - April 19, 2008 - 22:19

I've committed this patch to CVS HEAD and DRUPAL-6. Thanks mfb.

#16

Dries - April 19, 2008 - 22:29
Status:patch (code needs review)» fixed

#17

Anonymous (not verified) - May 3, 2008 - 22:31
Status:fixed» closed

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

#18

Damien Tournoud - July 11, 2008 - 09:33
Version:7.x-dev» 5.x-dev
Status:closed» patch (reviewed & tested by the community)

#212864: rss feed wrong date was also committed to the DRUPAL-5 branch, but only got released yesterday with Drupal 5.8. Here is a reroll.

AttachmentSize
232433.d5.node_.pubDate.patch1.18 KB

#19

drumm - July 16, 2008 - 18:49
Status:patch (reviewed & tested by the community)» fixed

Committed to 5.x.

#20

Anonymous (not verified) - July 31, 2008 - 04:46
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.