databasejoin AJAX WHERE not working on repeated groups

chris.paschen

Chris Paschen
I have a form that has a few basic fields and then one sub group with repeated elements.

The repeated group (PROVIDERS) elements include:

1. CATEGORY - databasejoin element on a table with just IDs and Category names
2. PROVIDER - databasejoin element on the CB table with the following WHERE clause:

{thistable}.cb_sp_category LIKE "{zz_test_book_team_reviews___role_id}"
OR {thistable}.cb_sp_category LIKE "{zz_test_book_team_reviews___role_id}|%"
OR {thistable}.cb_sp_category LIKE "%|{zz_test_book_team_reviews___role_id}|%"
OR {thistable}.cb_sp_category LIKE "%|{zz_test_book_team_reviews___role_id}"
ORDER BY {thistable}.cb_sp_business_name

And the AJAX update is set to yes.


It appears that there is a problem with the the AJAX (or where clause) when it is inside a repeating group.

On changing the selected CATEGORY the AJAX 'wheel' spins, but nothing displays in the PROVIDER element.

If I change the group setting for the PROVIDERS group to Repeatable = No, then the AJAX works fine. But as soon as I set it to YES, then

The only thing I'm seeing in the console is this:

GET https://kindredreaders2.cloudaccess...template_css.php?c=43&rowid=&view=form&rowid=
jquery-migrate.js:23 JQMIGRATE: Migrate is installed with logging active, version 1.4.1


Any ideas?

I'm using: Joomla 3.6.5
Fabrik: 3.5.2 w/GitUpdates as of 2017-01-28
 
The AJAX where stuff isn't going to work in repeat groups at the moment. That'll take quite a bit of extra coding. Something that's on my list, but will only bubble to the top when a paying subscriber needs that feature.

Most of the necessary code can be borrowed from the CDD element. It involves figuring out which repeat group the trigger is in on the client side, then on the server side, extracting the data for that instance of the repeat and making it available for the placeholders. Basically, you are using "table___element" as your placeholder, but the actual ids for repeated data are like table___element_0, table___element_1, etc ... so the server side code has to derive which repeated instance you need. And as I didn't need that feature for the project I was working on when when I coded up the AJAX stuff for joins, I didn't add it.

-- hugh
 
I was afraid of that.
For 'paying subscriber' ... would that be Standard or Professional and/or Custom coding?
(i.e. what would be the best/fastest way to get this implemented?)
 
I'll have to look at the code and figure out how long it would take. Really, even subscription support doesn't cover development cost. My hard limit for a Pro sub is an hour, and even that means any more support in that month means I'm running at a loss.

I'll look at the code and let you know. IOt might be a day or two though, as I'm somewhat sick at the moment, I've got a flu like bug that's been going around.

-- hugh
 
That's what I needed to know.
I've put in a direct request for a quote on this.
We have a project that needs this and would love to see this added back to Fabrik for others to use.

(And we've had that 'stuff' here ... I think we're finally over all of it !!!)
 
Just wondering if you have survived the 'stuff' and had a time to look at creating an estimate for this?
We'd love to move ahead asap.
 
Sorry to hear that. Best to take time to heal now. I hope you don't have the stuff that has been going around here - it can last for weeks! :-(
 
I'm pretty much recovered, but am a week behind, getting to this as quick as I can.

Sent from my HTC 10 using Tapatalk
 
OK ... looking forward to an update as soon as you can - could be ready to pay money quickly to get this done (depending on scope and time frame)
 
I'm looking at it now. Unfortunately it's one of those things that's really hard to give an estimate on without actually getting started on it and finding the gotchas. So I'll put half an hour or so into it, and it'll either get done, and I can hand you a bill, or enable me to give an accurate estimate.

-- hugh
 
OK, hopefully this fixes it:

https://github.com/Fabrik/fabrik/commit/a69e23666f9d246a3d491b7ad564373a1aedabad

So do a full github update, and let me know.

It wasn't as much work as I thought, as I had actually originally put most of the code in there needed to do this, I'd just never tested and finished it off. So it took a little under an hour.

So I'm prepared to exchange that for a month or two of a Pro sub. Whether it's one or two kind of depends on a) how generous you are feeling and b) how much support you need in addition to this.

-- hugh
 
Great I'll give it a try in just a bit. And it is DEFINITELY worth a couple months of pro (esp. considering the help I've already gotten here ... and just worth the investment).
I'll get the sub going shortly.
Thanks!
 
THIS WORKS GREAT!!!!!!!!

You have made my week! And I think greatly improved the functionality of Fabrik with that little change!

I'll get that subscription going shortly.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top