Closed black-meridian closed 3 years ago
Could you send a screenshot of the SuperBoxSelect template variable setting? Or could you post the serialized value in the input_properties column of modx_site_tmplvars of the SuperBoxSelect template variable?
thanks ! here 2 screenshots from the same template, from two different context
the first TV show all resources (because, the parent is from the same context)
the second one, from another context, show only the first level 👍
and here a screen from the TV config :
It's a bug caused by this line: https://github.com/Jako/SuperBoxSelect/blob/master/core/components/superboxselect/processors/types/resources/getlist.class.php#L96
I am quite busy at the moment and the bug looks quite nasty and I can't fix this directly.
Thanks Jaco for your answer
my developer did a little hack before line 96 :
$myParent=$this->modx->getObject('modResource',$parent);
if($myParent){
$contextKey=$myParent->get('context_key');
}
it seems to work
It should be fixed like this.
Could you check this patch, please. Then I don't have to create that configuration on my test installation.
Hi Jako, sorry for the delay. Your patch doesn't fix the search
For whatever reason, $modx->resourceMap
is empty during retrieving the child IDs with $modx->getChildIds
. Maybe because no (web?) context is initialized at that moment. After retrieving the parent resource, this is the case (at least) for the context of the retrieved resource. So the fix of your developer is (almost right). I have wrapped it with a check.
Hi,
i have a problem to list more than 1 level if I use a parent from another context.
only the first level of resources is available.
thanks !