Version: 1.0-beta8 (using KDE KDE 3.3.2) Installed from: Debian testing/unstable Packages Compiler: g++ 3.3.5 OS: Linux Some Atom feeds don't have a "created" element for each entry, causing akregator to substitute it with the current date. As a result, entries aren't shown in the actual chronological order. According to the Atom v0.3 specification, the "created" element is not necessary (section 4.13.8). I personally fixed this by changing the line 96 of "src/librss/article.cpp" to read "issued" instead of "created". I am not sure if this is the correct fix though. Perhaps the "modified" element should be used instead?
can you give the URL of such a feed?
Sure, many feeds from LiveJournal seem to omit the "created" element for some entries. Here's a random example that has several entries with only "issued" and "modified" elements: http://www.livejournal.com/users/thejonhill/data/atom Not that it should matter anyway, the specification clearly says the "created" tag is not required, while "issued" and "modified" are: http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.4.13.8
This problem still exists in beta10. Having tested the proposed fix for a month or so now, it appears to be correct.
Quote from the specification: "atom:entry elements MAY contain an atom:created element [...] If atom:created is not present, its content MUST considered to be the same as that of atom:modified." The bug is still present in HEAD.
SVN commit 414555 by osterfeld: Atom: Use <issued> instead of <created> as pubdate. BUG: 97874 M +21 -18 trunk/KDE/kdepim/akregator/src/librss/article.cpp --- trunk/KDE/kdepim/akregator/src/librss/article.cpp #414554:414555 @@ -86,36 +86,39 @@ if (d->description.isEmpty()) { if (!(elemText = extractNode(node, QString::fromLatin1("body"), false)).isNull()) - d->description = elemText; + d->description = elemText; if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html { if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) d->description = elemText; } - } + } - if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull()) - { - time_t _time; - if (format==AtomFeed) - _time = parseISO8601Date(elemText); - else - _time = KRFCDate::parseDate(elemText); + time_t time = 0; - // 0 means invalid, not epoch (it returns epoch+1 when it parsed epoch, see the KRFCDate::parseDate() docs) - if (_time != 0) - d->pubDate.setTime_t(_time); + if (format == AtomFeed) + { + elemText = extractNode(node, QString::fromLatin1("issued")); + if (!elemText.isNull()) + time = parseISO8601Date(elemText); } + else + { + elemText = extractNode(node, QString::fromLatin1("pubDate")); + if (!elemText.isNull()) + time = KRFCDate::parseDate(elemText); + } + if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull()) - { - time_t _time = parseISO8601Date(elemText); - - // 0 means invalid, not epoch (it returns epoch+1 when it parsed epoch, see the KRFCDate::parseDate() docs) - if (_time != 0) - d->pubDate.setTime_t(_time); + { + time = parseISO8601Date(elemText); } + // 0 means invalid, not epoch (parsers return epoch+1 when parsing epoch, see the KRFCDate::parseDate() docs) + if (time != 0) + d->pubDate.setTime_t(time); + if (!(elemText = extractNode(node, QString::fromLatin1("wfw:comment"))).isNull()) { d->commentsLink = elemText; }
SVN commit 414559 by osterfeld: backport: Atom: use <issued> instead of <created> for pubdates CCBUG: 97874 M +21 -18 branches/KDE/3.4/kdepim/akregator/src/librss/article.cpp --- branches/KDE/3.4/kdepim/akregator/src/librss/article.cpp #414558:414559 @@ -86,36 +86,39 @@ if (d->description.isEmpty()) { if (!(elemText = extractNode(node, QString::fromLatin1("body"), false)).isNull()) - d->description = elemText; + d->description = elemText; if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html { if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) d->description = elemText; } - } + } - if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull()) - { - time_t _time; - if (format==AtomFeed) - _time = parseISO8601Date(elemText); - else - _time = KRFCDate::parseDate(elemText); + time_t time = 0; - // 0 means invalid, not epoch (it returns epoch+1 when it parsed epoch, see the KRFCDate::parseDate() docs) - if (_time != 0) - d->pubDate.setTime_t(_time); + if (format == AtomFeed) + { + elemText = extractNode(node, QString::fromLatin1("issued")); + if (!elemText.isNull()) + time = parseISO8601Date(elemText); } + else + { + elemText = extractNode(node, QString::fromLatin1("pubDate")); + if (!elemText.isNull()) + time = KRFCDate::parseDate(elemText); + } + if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull()) - { - time_t _time = parseISO8601Date(elemText); - - // 0 means invalid, not epoch (it returns epoch+1 when it parsed epoch, see the KRFCDate::parseDate() docs) - if (_time != 0) - d->pubDate.setTime_t(_time); + { + time = parseISO8601Date(elemText); } + // 0 means invalid, not epoch (parsers return epoch+1 when parsing epoch, see the KRFCDate::parseDate() docs) + if (time != 0) + d->pubDate.setTime_t(time); + if (!(elemText = extractNode(node, QString::fromLatin1("wfw:comment"))).isNull()) { d->commentsLink = elemText; }
SVN commit 414571 by osterfeld: backport of 97874: clear search bar when selecting nodes CCBUG: 97874 M +13 -5 branches/KDE/3.4/kdepim/akregator/src/akregator_view.cpp --- branches/KDE/3.4/kdepim/akregator/src/akregator_view.cpp #414570:414571 @@ -843,6 +843,8 @@ m_tabs->showPage(m_mainTab); + slotClearFilter(); + if (m_viewMode == CombinedView) m_articleViewer->slotShowNode(node); else @@ -1342,16 +1344,22 @@ void View::slotSearchComboChanged(int index) { - Settings::setQuickFilter( index ); - updateSearch(); + if (index != Settings::quickFilter()) + { + Settings::setQuickFilter( index ); + updateSearch(); + } } // from klistviewsearchline void View::slotSearchTextChanged(const QString &search) { - m_queuedSearches++; - m_queuedSearch = search; - QTimer::singleShot(200, this, SLOT(slotActivateSearch())); + if (m_queuedSearch != search) + { + m_queuedSearches++; + m_queuedSearch = search; + QTimer::singleShot(200, this, SLOT(slotActivateSearch())); + } } void View::slotActivateSearch()