Results 1 to 2 of 2

Thread: Bug(?) when filtered by 2 fields of tags type

  1. #1
    New user
    Join Date
    03-22-12.
    Posts
    2

    Default Bug(?) when filtered by 2 fields of tags type

    Hi,
    because I try to filtered catalog by 2 tags fields and result was not as expected, I spend some time to code analize.
    I think I found bug.
    In ModuleCatalog.php about lines 520-530 is code:
    Code:
    foreach(explode(',', $current[$field]) as $tag)
    							$tags[] = (int)$tag;
    Bug(?) is, when i have 2 fields of tag type, this line added both of tag.

    eg. firse filtr a = 1, second filtr a = 2. For first field tag is ok and $tags array have 1 value "1", but for second, tags array has TWO values 1 and 2.
    This is because array tag IS NOT cleaerd between loop step...
    I added for test one line
    Code:
    $tags=array(); //line added
    foreach(explode(',', $current[$field]) as $tag)
    							$tags[] = (int)$tag;
    and now my result looks ok.

    Can you check, this is bug or intended ?

  2. #2
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default Re: Bug(?) when filtered by 2 fields of tags type

    Hi,
    try the SVN-Version. There is a bugfix for that.

    regards
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •