opengeek/getResources — Issue #55: processTVList doesnt seem to be working as intended. Suggested Solution
Author: marcushouse
Created: 2011-10-30 23:35:21+00:00
State: open

Hi there,
With this getResources call
[[getResources? &depth=`0` &includeTVs=`1` &includeTVList=`general-page-img` &processTVList=`general-page-img` &sortby=`menuindex` &sortdir=`DESC` &parents=`[[*id]]` &limit=`100` &tpl=`getResources_subseclist_menuindex`]]

The general-page-img TV is being returned but not processed. From the documentation it appears that processTVs=`1` is not required (although to be honest it seems strange that you need both includeTVs and includeTVList together. Surely if you are being specific the includeTVList alone would be enough).

In the getResources snippet (1.4.0) on line 378 it has
if ($processTVs && (empty($processTVList) || in_array($templateVar->get('name'), $processTVs)))

I changed mine to

if (!empty($processTVList) && in_array($templateVar->get('name'), $processTVList))

and my TV began processing again. Whether or not this is the correct fix I am not 100% sure however it seems that in teh currecnt code it is looking for the name in the processTVs variable (it should be the processTVList variable shouldnt it?

Secondly the first part of the if seems to be requiring processTVs to be set to 1 before it will allow it past that condition.

Thoughts?

Currently I am assuming this area is bugged. Please let me know otherwise.

kind regards

Marcushouse