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.
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)
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
Title |
|
||||||
Labels |
Added:
?
|
Title |
|
Category | ⇒ | com_newsfeeds |
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
Status | New | ⇒ | Discussion |
Labels |
Added:
J3 Issue
|
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-18 11:18:23 |
Closed_By | ⇒ | wilsonge |
I suspect the reason is because the specification states
But it does seem more logical for it be first availabilty ie published date