{$my->id} not substituted in EXISTS prefilter

ronhon

New Member
Hi there,

If I try to pre filter a list with

- EXISTS SELECT id from second table WHERE col1 = {$my->id} AND col2 = testvalue,

{$my->id} is not substituted, resulting in an SQL error.

When I replace the - by some random list element,
the value for {$my->id} is substituted but of course the generated query does not make sense.

Can you please fix this on short notice or tell me how I can repair this myself?

Thanks
 
EDIT - ignore this

The reason I ask is, I can't work out if there's a valid use of the EXISTS pre-filter condition that would make sense to select a "Field" for. I can only imagine uses where you would leave the field blank, condition EXISTS, and a subquery.

Which, as far as I can tell, would explain why the placeholder replacement doesn't run, because if no field is selected, we return from the funciton that builds all that stuff before the replacement happens.

-- hugh
 
Just FYI, the code is in ./components/com_fabrik/models/list.php, in the getFilterArray() method. Placeholder replacement happens around line 5106, but if no field is selected, $elid is 0, and (at least in my test list) as I have a list plugin on the list, the code at line 5071 makes the incorrect assumption that we are dealing with a plugin filter.

Still working on it.

-- hugh
 
Thanks Hugh,

It works fine now. I don't think having a list plugin on the list makes the difference. I did not have one on the list.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top