Basicly i managed to find a solution for now...
and i guess this will only work if you do not make use of ’Document Groups’ (whatever they are).
the standard SQL Query for Wayfinder is:
SELECT DISTINCT sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.parent, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,IF(sc.type='reference',sc.content,'') AS content, sc.template, sc.link_attributes
FROM `<yourDatabaseName>`.`modx_site_content` sc
LEFT JOIN `<yourDatabaseName>`.`modx_document_groups` dg
ON dg.document = sc.id
WHERE sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu=0 AND sc.id IN (1,2,3,4,5,7,8,6)
GROUP BY sc.id
ORDER BY menuindex ASC ;
Now, if you make no use of Document Groups the join in this query makes little to no sense at all, it joins, and does nothing with it.
So the query that would make more sense for me, would be:
SELECT DISTINCT sc.id, sc.menutitle, sc.pagetitle, sc.introtext, sc.menuindex, sc.published, sc.hidemenu, sc.parent, sc.isfolder, sc.description, sc.alias, sc.longtitle, sc.type,IF(sc.type='reference',sc.content,'') AS content, sc.template, sc.link_attributes
FROM `<yourDatabaseName>`.`modx_site_content` sc
WHERE sc.published=1 AND sc.deleted=0 AND (sc.privateweb=0) AND sc.hidemenu=0 AND sc.id IN (1,2,3,4,5,7,8,6)
ORDER BY menuindex ASC ;
As you can see this is alot simpeler. This makes it work for ’me’.
What i did is comment out the following line:
$sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc LEFT JOIN {$tbldg} dg ON dg.document = sc.id WHERE sc.published=1 AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") GROUP BY sc.id ORDER BY sc.{$sort} {$this->_config['sortOrder']} {$sqlLimit};";
This line of code should be around
line 352 in the
wayfinder.inc.php file.
And replace it with:
$sql = "SELECT DISTINCT {$fields} FROM {$tblsc} sc WHERE sc.published=1 AND sc.deleted=0 AND ({$access}){$menuWhere} AND sc.id IN (".implode(',',$ids).") ORDER BY sc.{$sort} {$this->_config['sortOrder']} {$sqlLimit};";
I hope i help someone with this. This isn’t a very pretty solution, but it works for ’me’. I suspect this will not work if you make use of ’Document Groups’, what ever they are.