opengeek/getResources — Issue #54: Issue with including TV list
Author: leoandrews
Created: 2011-10-29 13:14:42+00:00
State: open

I'm having some problems selecting a single TV to be included and processed. When I run the below, the TV called articleThumbnail is not returned (although it does return resources sans that). If I don't include the TVLists, the TV comes back fine. Why is this?

Below I specify the TV name in double-quotes as it's a string but no joy with it coming back
[[!getResources? &resources=`[[*hpHighlightsIDlist:default=`3`]]` &limit=`` &tpl=`tpl_SubPageDirList` &includeTVs=`1` &processTVs=`1` &includeTVList=`"articleThumbnail"` &processTVList=`"articleThumbnail"` &sortby=`{"FIELD(modResource.id,[[*hpHighlightsIDlist:default=`3`]])","ASC"}` &parents=`-1`]]

With debug mode on, the SQL is
[2011-10-29 06:12:12] (ERROR @ /index.php) context for -1 is
[2011-10-29 06:12:12] (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`.`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` FROM `modx_site_content` AS `modResource` WHERE ( ( modResource.parent IN (-1) AND `modResource`.`deleted` = 0 AND `modResource`.`published` = 1 AND `modResource`.`hidemenu` = 0 ) OR `modResource`.`id` IN (13,14,25,4) )

Specifying it without quotes yields the following error:
[2011-10-29 06:09:52] (ERROR @ /path_to_site/core/cache/includes/elements/modsnippet/10.include.cache.php : 384) PHP warning: in_array(): Wrong datatype for second argument

If I specify just the id numbers of the TV, it returns nothing.