Belzunces created the topic: Unique item per author not sorting Last added first option.
Submitted support ticket on 04th May and no answer yet, I paste the content of the ticket within this post.
Filter not ordering correctly with unique item per author selected.
Mayo 04, 2017 04:33
In JoomlaXTC K2 Content Wall v 1.38.0 When you order by (Last added first) and field "Unique item per Author" is Yes, the result is not ordered by Created date. It shows the first item created by each author, not the last one. Here you are the sql query yo create:
SELECT i.id, i.video, i.gallery, i.access, i.introtext, i.fulltext, i.title, i.featured, UNIX_TIMESTAMP(i.created) as created, UNIX_TIMESTAMP(i.modified) as modified, UNIX_TIMESTAMP(i.publish_up) as publish_up, UNIX_TIMESTAMP(i.publish_down) as publish_down, i.catid, i.extra_fields, i.created_by, i.hits, i.params, cc.params as cat_params, cc.name as cat_title, cc.image as cat_image, cc.description as cat_description, cc.alias as cat_alias, u.username as author, u.name as authorname, CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(":", i.id, i.alias) ELSE i.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug, kr.rating_sum , kr.rating_count, kr.lastip FROM ilvk6_k2_items AS i LEFT JOIN ilvk6_k2_rating AS kr ON kr.itemID = i.id, ilvk6_k2_categories AS cc, ilvk6_users AS u WHERE cc.id = i.catid AND u.id = i.created_by AND i.published = 1 AND i.trash = 0 AND cc.published = 1 AND cc.trash = 0 AND i.access IN (1,1,5) AND i.catid IN(93,79,110,91,81,76,102,107) GROUP BY i.created_by ORDER BY i.created DESC
This query is not correct, due to a problem in the structure of Group by nested into a Group By.
Is this error solved in a future version? Is there any patch to solve this?