Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When I sort feed items by the Day of their creation, the view doesn't order the nodes properly. However, when the granularity option is left on normal, it does.
Comment | File | Size | Author |
---|---|---|---|
#4 | granularity.sort_.patch | 1.72 KB | merlinofchaos |
#2 | granularity.sort_.patch | 1.73 KB | merlinofchaos |
Comments
Comment #1
taqwa CreditAttribution: taqwa commentedJust to clarify the problem a little further. When I select Granularity:Day, I understand that the sort order will ignore all other times and just sort by the day of the post. However, it's not doing this. Instead the order seems to be quite random. I also tried making a rule that sorts by Granularity: Year or Granularity: Month, but this causes the view to crash. I just get an empty page with the pager at the bottom.
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedOk, I found two problems. Minute granularity was broken due to the confusion between %m -- it's month, not minute. Day granularity was slightly off because it was failing to correct for timezone. Both problems are fixed and checked in; and because I'm feeling generous, here's the patch
Comment #3
meatbites CreditAttribution: meatbites commentedBrilliant! Thanks for providing this, Earl.
I just noticed something, though -- the last argument for DATE_FORMAT under month is
'%Y%m%
-- should that have a closing apostrophe?Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedAck. You're right -- also, there are extraneous % on both 'month' and 'year'. I don't THINK those extra % should cause issues, but it's hard to say.
Updated patch attached. (also committed to -dev).
Comment #5
meatbites CreditAttribution: meatbites commentedThis seems to work well.
The sorts also work when all the percent signs are removed. They're there for a reason, though, I guess...
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
asund CreditAttribution: asund commentedI couldn't get this to work so i did a bit of testing.
It's strange, but when i changed %Y%m%%d to %Y%m%j it worked fine!
It doesn't really make sense to me, but as long as it works, I'm happy! ;)
EDIT: Rushed to a conclusion there.. still some problems!