-
AuthorPosts
-
January 22, 2016 at 11:26 am #865283
Hello, It appears that the ‘order-by’ setting is not respected when set via the module options – whatever it is set makes no difference to output. This is the same for the global setting.
I see this post mentions something similar: https://www.joomlart.com/forums/topic/jak2filter-ordering-not-working/. Applying the fix to itemlist.php as directed does change the order for more recent items first, but this script also prevents the ‘order by’ box on the front-end having any effect on the results.
Is this bug (which it appears to be) being patched in a new release?
In addition, the ‘date range’ filter seems to be working on the modified date rather than the published date… which doesn’t make sense at all. Can this be changed somewhere?
Thanks.
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
January 25, 2016 at 9:07 am #867585Hi,
Hello, It appears that the ‘order-by’ setting is not respected when set via the module options – whatever it is set makes no difference to output. This is the same for the global setting.
The setting in module just show the default option and it doesn’t take affect to the result, only in the Global setting. This issue is fixed but not release yet, please use the zip file I have attached here.
In addition, the ‘date range’ filter seems to be working on the modified date rather than the published date… which doesn’t make sense at all. Can this be changed somewhere?
That’s strange that you think it doesn’t make sense. Btw, here is the fix: Go to file: components/com_jak2filter/models/itemlist.php
From:if ($start_created){ $sql .= " AND (i.created >= ".$db->quote($start_created)." OR i.modified >= ".$db->quote($start_created).")"; } if ($end_created){ if($start_created == $end_created) { $end_created .= ' 23:59:59'; } $sql .= " AND (IF(i.modified <> ".$db->quote($db->getNullDate()).", i.modified, i.created) <= ".$db->quote($end_created).")"; }
Change file to:
if ($start_created){ $sql .= " AND (i.created >= ".$db->quote($start_created)." OR i.modified >= ".$db->quote($start_created)." OR i.publish_up >= ".$db->quote($start_created)." )"; } if ($end_created){ if($start_created == $end_created) { $end_created .= ' 23:59:59'; } $sql .= " AND (IF(i.modified <> ".$db->quote($db->getNullDate()).", i.modified, i.created) <= ".$db->quote($end_created)." OR i.publish_down <= ".$db->quote($end_created)." )"; }
-
AuthorPosts
This topic contains 1 reply, has 2 voices, and was last updated by Luna Garden 8 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum