• 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.

Add parameter to form url

Hi guys,

I have a special situation where I get a parameter in to the list and I need to pass this parameter on to the form. This parameter is part of the pre-filter on the list and I use $_GET to get it there and it works great. Fabrik however seems to use all the pre-filter values to send to the form which is then used in the WHERE clause on the form to get the row from the database. Because this parameter is not part of the form url, the prefilter calculates the incorrect value and it fails. In the Form, the WHERE is constructed like this:

WHERE vlt_iscm_client_to_do_list.jclient_to_do_list_id = '29'
AND ((vlt_iscm_client_to_do_list.juser_id = '2010'
AND vlt_iscm_client_to_do_list.juser_info = '0969e8941357d246a1ccdd2472c2a653'))

and it's that juser_info hash that is part of the prefilter.

I've tracked this to a line in form.php:

// Get pre-filter conditions from table and apply them to the record
// the false, ignores any filters set by the table
$where = $listModel->buildQueryWhere(false);

This adds the prefilters to the WHERE statement. I don't quite understand the need for that as it already has the primary key filter. If I modify this to:

// AB 2019-12-04: $where = $listModel->buildQueryWhere(false);
$where = ''; # AB 2019-12-04: Modified line above and this.

it seems to work fine and the SQL is generated correctly with just the primary key column in the where clause:

WHERE vlt_iscm_client_to_do_list.jclient_to_do_list_id = '551'

But I also don't understand why it quotes the value, which is an INT in the database?

Any way to work around this without modifying this one line?

Best regards,
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top