How to replicate the problem:
- Create a View (Term)
- Choose the vocabulary
- Continue to edit the View
- Add the relationship "taxonomy Term: Representative node"
now choosing any "Representative sort criteria" and "Representative sort order" the sort order has no effect. Indeed the Preview SQL query has no "ORDER" clause.
Also the 7.x-3.x-dev seems affected.
Am I doing something wrong?
UPDATE:
Debugging the query using hook_views_query_alter() I noticed that the left_query ($query->table_queue['node_taxonomy_term_data']['join']->left_query) is using (some) default settings. The ORDER BY clause is always:
ORDER BY nodeINNER.nid ASC
Comments
Comment #1
gambryFlushing the cache fixes the problem, the correct subquery ORDER BY is loaded.
But you must flush the cache after any changes.
Comment #2
esmerel commentedComment #3.0
(not verified) commentedUpdates after debugging
Comment #4
ronino commentedAs this bug still exists and this issue is closed, I created a new one at #2982309: "Representative record" relationship handler configuration without effect and fixed it.