I’ve found a patch that seems to work for MODx in the meantime.
Lines 92-98 in 3ldr.php:
$sql = "SELECT DISTINCT sc.id, pagetitle, parent, isfolder, published, deleted, type, menuindex, hidemenu, alias, contentType, privateweb, privatemgr
FROM $tblsc AS sc
LEFT JOIN $tbldg dg on dg.document = sc.id
WHERE (parent=$parent)
AND ($access)
GROUP BY sc.id
ORDER BY $orderby";
I just added a GROUP BY clause in. This seems to be working, touch plastic. The query produces unique rows in the correct order, including for the case where a doc is assigned to multiple doc groups. If anyone can spot any potential hiccups with this approach, then please let me know.
Thanks,
Anton