?
avatar Ddcdom
Ddcdom
24 Nov 2016

Steps to reproduce the issue

Create an RSS feed

Expected result

The timestamp of the channel's node should show the time that the feed content was last updated.

Actual result

The timestamp of the channel's node is the time of the page load.

System information (as much as possible)

Joomla 3.6.4 fresh install

Additional comments

According to the RSS specification https://validator.w3.org/feed/docs/rss2.html#ltpubdategtSubelementOfLtitemgt, the channel's last build date node is defined as

"lastBuildDate 	The last time the content of the channel changed."

It should be possible to set the last build date within a custom built component.

avatar Ddcdom Ddcdom - open - 24 Nov 2016
avatar brianteeman brianteeman - change - 24 Nov 2016
Category Libraries com_newsfeeds Libraries
avatar brianteeman
brianteeman - comment - 26 Nov 2016

this would require a big code change. You would need to load all the items, determine which is the newest and then use that date for the lastBuildDate - at this moment in time you are quite correct it always uses now https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/document/renderer/feed/rss.php#L81


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13008.

avatar Ddcdom
Ddcdom - comment - 27 Nov 2016

I understand that it would be a huge job to get the code working as per RSS specification. However, as pubDate is an optional channel element, wouldn't it be better to not include this in the feed output, rather than including incorrect information?

Allowing the pub date value to be changed in a component would be a smaller change and a big improvement over the current hard coded situation. This would allow custom components to manage the pubdate of their feed if they choose to.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13008.

avatar brianteeman brianteeman - change - 1 Dec 2016
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Feb 2017

wouldn't it be better to not include this in the feed output, rather than including incorrect information?

I agree, @Ddcdom

avatar mbabker
mbabker - comment - 4 Feb 2017

Fixed for 4.0.

In your view.feed.php file (or any place really before the document is rendered) you'll be able to do this:

JFactory::getDocument()->lastBuildDate = new JDate('2017-02-04 17:11:00', new DateTimeZone('America/Chicago'));
avatar mbabker mbabker - change - 4 Feb 2017
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2017-02-04 23:12:04
Closed_By mbabker
avatar mbabker mbabker - close - 4 Feb 2017

Add a Comment

Login with GitHub to post a comment