• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

{$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