test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • graphnic Friend
    #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 Moderator
    #867585

    Hi,

    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)." )";
            }

    1. com_jak2filter.zip

Viewing 2 posts - 1 through 2 (of 2 total)

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