J3 Issue ?
avatar AndNovAtor
AndNovAtor
27 Jun 2018

Is your feature request related to a problem? Please describe.

In RSS/Atom feed [category] view (with url - /?format=feed&type=atom), in xml, item creation date is used for <pubDate> / <published> tag instead of publish date. Why? Sorting of the items is still displayed by date of publication, as my blog category view sorting settings.

Describe the solution you'd like

So, I edited \Joomla\CMS\MVC\View\CategoryFeedView , for Joomla 3.8.10 - /libraries/src/MVC/View/CategoryFeedView.php, on line :100,

replace:

if ($createdField)

with:

if (isset($item->publish_up)) { $date = date('r', strtotime($item->publish_up)); } elseif ($createdField)

Additional context

But with my code meaning of $createdField is ignored ($date = isset($item->$createdField) ? date('r', strtotime($item->$createdField)) : '';). So. my code is only workaround for my problem.

P.s. sorry for my English

avatar AndNovAtor AndNovAtor - open - 27 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2018
Title
In CategoryFeedView - use article [item] publish date instead of creation date for... <pubDate> / <published>
In CategoryFeedView - use article [item] publish date instead of creation date for... /
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jun 2018
avatar AndNovAtor AndNovAtor - change - 27 Jun 2018
Title
In CategoryFeedView - use article [item] publish date instead of creation date for... /
In CategoryFeedView - use article [item] publish date instead of creation date for RSS / ATOM... /
avatar AndNovAtor AndNovAtor - edited - 27 Jun 2018
avatar AndNovAtor AndNovAtor - change - 27 Jun 2018
The description was changed
avatar AndNovAtor AndNovAtor - edited - 27 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - edited - 27 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 Jun 2018
Category com_newsfeeds
avatar brianteeman
brianteeman - comment - 29 Jun 2018

I suspect the reason is because the specification states

Typically, atom:published will be associated with the initial
creation or first availability of the resource.

But it does seem more logical for it be first availabilty ie published date

avatar AndNovAtor
AndNovAtor - comment - 29 Jun 2018

Oh, okey.

for it be first availabilty ie published date

So, what's Joomlas's opinion on this? Because Joomlas's publish up article date can be used for creating news "from the past" (for example, when I migrate news to the new site version and want to "save" RSS from the old site version).
Btw, RSS specification "says":

pubDate The publication date for the content in the channel

avatar franz-wohlkoenig franz-wohlkoenig - change - 29 Jun 2018
Status New Discussion
avatar brianteeman brianteeman - change - 2 Aug 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 2 Aug 2018
avatar wilsonge wilsonge - close - 18 Aug 2018
avatar wilsonge
wilsonge - comment - 18 Aug 2018

Closed as there is a PR #21684

avatar wilsonge wilsonge - change - 18 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-18 11:18:23
Closed_By wilsonge

Add a Comment

Login with GitHub to post a comment