Hi all,
I have a problem where gR is displaying the "grand-"children of the parent I specify (which I don't want), before listing the children that I want.
Here's the current resource structure from the Resource List:
Home (1) (home template contains gR call)
...
Products (4)
- Product 1 (7)
- option 1 (9)
- option 2 (10)
- option 3 (41)
- option 4 (47)
- Product 2 (8)
- option 1 (11)
- option 2 (12)
etc...
Here's the gR call in the Home page tpl:
[[!getResources ? &parents=`4` &tpl=`gr_ProductsListHome` &depth=`1`]]
Here's what I expect to see listed:
Product 1 (7)
Product 2 (8)
Here's what is being displayed:
option 1 (9)
option 2 (10)
option 1 (11)
option 2 (12)
option 3 (41)
option 4 (47)
Product 1 (7)
Product 2 (8)
Running with debug, I am able to see that there is a fault in the SQL relative to the snippet call:
...WHERE ( modResource.parent IN (4,7,8) AND...
SELECT `modResource`.`id`, `modResource`.`type`, ...
...
... `modResource`.`properties` FROM `modx_site_content` AS `modResource` WHERE ( modResource.parent IN (4,7,8) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 ) ORDER BY publishedon DESC
There doesn't seem to be a reason as to why 7 and 8 should be included in that SQL statement. Specifying &resources works fine, but I need to have the flexibility of automatically listing any immediate children of (4).
Can anyone assist please? My current guess is that there is something faulty that requires a reinstall of MODx and/or gR (have already reinstalled gR once, with no success).
[PS - for what it may matter, Products (4) and all Option resources (ids 9-47) are weblinks; however, that has not been a stumbling block in the past.]
[PPS - I'm wondering if there might be a connected event. I tried to edit the limit property in the getResources snippet itself, but there are issues saving the changes, and the change is not reflected in the db. Network tab in Developer Tools shows that the POST command to /connectors/elements/snippet.php is returning a 404 error. Could this error be connected?]