Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
25 stars 19 forks source link

Articles with same date in same topic. This caused an issue. #1091

Closed eSilverStrike closed 2 years ago

eSilverStrike commented 3 years ago

Issue reported in Geeklog Forum https://www.geeklog.net/forum/viewtopic.php?showtopic=97425#97425

From OMAL

On my site, there are articles with same date in same topic. This caused an issue.

ref. https://github.com/Geeklog-Core/geeklog/blob/master/public_html/lib-common.php https://github.com/Geeklog-Core/geeklog/blob/master/system/lib-syndication.php

SYND_feedUpdateCheck() is called in line 2258, and SYND_updateFeed() is called in line2268. SYND_feedUpdateCheck() calls SYND_feedUpdateCheckTopic() in which sql is sorted by date in line 149. In the same way, SYND_updateFeed() calls SYND_getFeedContentPerTopic() in which sql is sorted by date in 254.

For the Sid with exactly same date, those two returns different order. So this should be ordered by date AND SID like the following, to fix this issue. PHP Formatted Code ORDER BY date DESC, sid

If Geeklog doesn't allow post articles with same date for same topic, it doesn't occur. My site is customized a lot, and there are articles with same date, so it happens.

eSilverStrike commented 3 years ago

Have not confirmed this but added it anyways.

mystralkk commented 2 years ago

Fixed with change set ec153bce870504c745506b4bb4e5bfb46f101163.