hey,
recently i figured out a problem with getResources. Due to the resource structure, it is necessary to call getResources recursively for us.
The parent call is runing properly. But as soon as i put the second call into the &tpl it is throughing a wierd error to the modx error log (getResources debuging enabled).
here the parent call
[[getResources?
&parents=`30`
&depth=`0`
&sortby=`menuindex`
&sortdir=`ASC`
&showHidden=`1`
&limit=`52`
&tpl=`parentTpl`
]]
here parentTpl:
<h1>[[+pagetitle]]</h1>
[[getResources?
&parents=`[[+id]]`
&depth=`1`
&sortby=`pagetitle`
&includeContent=`1`
&includeTVs=`1`
&hideContainers=`1`
&tpl=`childTpl`
]]
here childTpl:
<h2><a href="[[~[[+id]]]]" title="[[+pagetitle:notags]]">[[+pagetitle]]</a></h2>
<more markup>
and here now one of the essential error snip:
[2012-05-06 15:48:41] (ERROR @ /index.php) context for 19 is web
[2012-05-06 15:48:41] (ERROR @ /index.php) SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties` FROM `modx_site_content` AS `modResource` WHERE ( modResource.parent IN (19,767,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 AND `modResource`.`isfolder` = 0 ) ORDER BY pagetitle DESC LIMIT 5
The first line in the error throw seems interesting. And i do not understand why there is a context problem. The second sql query seems okay so far.
So where is the mistake? How to solve the problem. The content of getResources isn't outputed at all. The rest of the Template seems to be rendered properly.
greetings
Mopox