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

dbjoin/cdd issues

davboh

New Member
  1. dbjoin : when I use the url for setting default value, it does not respect the sql "Joins where and/or" field (Data - where tabs) defined in the admin settings of that dbjoin
  2. on a form I have a dbjoin + cdd linked to the dbjoin. When I use the url for setting default value on the dbjoin, I have 2 issues:
  • previously, I used to use this notation ?table___field_id_raw=6 but that doesn't work anymore. However, table___field_id=6 is working, the field displays the data needed => could you restore the _raw notation
  • when I use ?table___field_id=6, the dbjoin displays the data needed but the cdd doesn't display the data however, if I use ?table___field_id_raw=6 the cdd is okay
 
Last edited:
1. I don't think a default value has anything to do with the data-where, it's up to you what you want to set.
2. Sounds strange. Maybe
?table___field_id=6&table___field_id_raw=6
will do.
 
I'm a bit confused because if you intentionally define settings into the dbjoin, all the records that the dbjoin is rendering should respect them.
In my case, records that the dbjoin is supposed to display are not shared between users. Each user has its owns records so if I set a default value attached to another user, it not respect ACL from my perpective.
 
Do you plan to update the code?
If you doesn't could you point the files/code/line where I could apply the where settings please?
 
You can apply your restrictions in your default settings (set "Eval default"=yes and do whatever you need).
As you can see in the data-where tooltip this WHERE is not applied in all circumstances.
 
Hi, again about then point 1/, could you point me the function where the code do process to query and get the value form db when we set a default value from the url please?
Precision: dbjoin is set to render as an autocomplete

example when I want to add a new record and want to preset a value on that dbjoin:

myurl.com/index.php?option=com_fabrik&view=form&formid=1&table___field=345
 
Last edited:
I believe you haven't understand what I've reported. I'll try to explain again, sorry if my english is so bad

I have a dbjoin rendered as an autocomplete. The element contains a "Joins where and/or" statement in order to filter records. When I make a search in that dbjoin, the autocomplete behavior is correct and displays the right records.
However, when I access the form using an url and would like to set dbjoin default value (table___field=34 and not table___field_raw=34), the sql statement isn't respected and the dbjoin display the label linked to 34 db record. According to the sql statement, 34 db record shouldn't be displayed! => for me it's a bug

BTW, when I use table___field_raw=, the dbjoin autocomplete doesn't display any records even if the record respects the sql statement.

Hope it's clear
 
A dbjoin element is preset with table___element_raw=value
This does respect restrictions in data-where: if the preset value is not included in the data-where list you'll see "Please select"(or nothing selected in case of radiolist)
This is working with the standard "Render as" dropdown or radiolist.

Presetting via URL does not trigger the autocomplete.
You can set the table___element_raw=value AND table___element_raw=label but this is not "tested" against your data-where.
If you have a data-where you must add something like a php plugin "on load" to fetch the URL_raw param (the value, the label is only display, it can be anything) and apply your conditions there again.
 
Presetting via URL does not trigger the autocomplete.
Why a such behavior difference between the dropdown/radiolist and the autocomplete? This is non consistent and for me, it's a security/ACL issue! We can fetch records from other users by this way

If you have a data-where you must add something like a php plugin "on load" to fetch the URL_raw param (the value, the label is only display, it can be anything) and apply your conditions there again.
I can't see how to alter the records and applying my conditions there again. Could you write an example?

Could you point into the php code where the sql statement isn't applied, I'll try to have a look there
 
Why a such behavior difference between the dropdown/radiolist and the autocomplete?
I don't know. Fabrik is free software and is "as it is".
As I said: you may add a php plugin to overcome such issues.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top