Help with Cascading Dropdown

Status
Not open for further replies.

jeanette

Member
I'm using the latest Fabrik with Joomla 2.5. I've set up some cascading drop downs (from github dated 25th Jan).

The second drop down only seems to show the available options after either hitting save or apply. In the older version the second drop down would show the available options as soon as the first had been selected.

What am I doing wrong? Any help would be greatly appreciated.

Thanks.

PS Could not say enough positive things about Fabrik - you guys are fantastic!
 
Do you mean you have more than one CDD "daisy chained"?

So it's like ... (for example) ...

Country (join element) -> State (CDD) -> City (CDD)

Or just a single CDD watching a join (or whatever)?

Either way, the answer is "it should update", but I need to know the exact details to get a test set up.

-- hugh
 
Thanks, it may well just be something silly I have done (although it does create the correct options on submit).

Its a single cascading drop down - the database join is activities, and the CCD is sub-activities.

Your help is greatly appreciated.
 
Hmm, that should definitely work. Which means it's probably a Javascript issue on the page.

Can you point me at the page? If I need to login, find me on Skype ('cheesegrits') or PM the details here. I prefer Skype, as it usually helps to have you on hand to tweak anything that needs tweaking on the site.

-- hugh
 
OK, it's not a Fabrik issue. J! is pitching a warning which is coming back in the response to the AJAX call we make to populate the CDD. Our data is coming back correctly, but it's preceeded by this warning, which is messing up our JSON response parsing:

Code:
<b>Warning</b>:  array_diff_assoc() [<a href='function.array-diff-assoc'>function.array-diff-assoc</a>]: Argument #1 is not an array in <b>/home/competen/public_html/jupgrade/libraries/joomla/cache/cache.php</b> on line <b>612</b><br />

It's something to do with module caching. I've looked at that file, and it's not something which Fabrik invokes. We don't go anywhere near J!'s page or module caching during AJAX calls.

It's probably some other 3rd party system plugin or module piggy backing when it shouldn't.

Try turning off any non-standard system plugins, see if you can identify the problem.

-- hugh
 
Thanks Hugh.

The problem now seems to have evolved - any ideas?

Error: syntax error
Source File: http://*mysite*/media/system/js/mootools-core.js
Line: 497, Column: 1
Source Code:
(<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

}if(!JSON.validate(string)){throw new Error("JSON could not decode the input; security is enabled and the value is not secure.");}}return eval("("+string+")");
 
Still seems to be an issue with your site. Something is wrapping the returned JSON from our cascade update AJAX request in HTML:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>[{"value":"","text":"Please select","disable":false},{"value":"1","text":"Circuits"},{"value":"2","text":"Data"}]</p></body></html>

There should be none of that DOCTYPE HTML stuff around the JSON, which is the stuff immediately inside the <p> tag. That's what the &format=raw does, it tells J! to leave out all of it's normal HTML guff, and just let the component return a "raw" response (usually either XML or JSON). Again, the only thing I can imagine doing that is some kind of 3rd party system plugin.

But I've never seen that behavior before, so I have no clue which component / plugin might be doing it.

-- hugh
 
Just so you can see what's happening yourself ... here's the URL we're actually firing to get the CDD content:

Code:
http://your.site/jupgrade/index.php/en/?TrialExperienceLog___id=1&TrialExperienceLog___id_raw=1&TrialExperienceLog___date_time=2012-02-01%2012:09:00&TrialExperienceLog___date_time_raw=2012-02-01%2012:09:00&TrialExperienceLog___UserName=62&TrialExperienceLog___UserName_raw=62&TrialExperienceLog___TrialActivity=DE&TrialExperienceLog___TrialActivity_raw=DE&TrialExperienceLog___TrialSubActivity=3&TrialExperienceLog___TrialSubActivity_raw=3&option=com_fabrik&format=raw&task=plugin.pluginAjax&plugin=cascadingdropdown&method=ajax_getOptions&element_id=16&v=DE&formid=4&fabrik_cascade_ajax_update=1

Just copy and paste that in to your browser, replace your.site, and get rid of any spaces the forum may have added in my post. You should see this in your browser as the response:

Code:
[{"value":"","text":"Please select","disable":false},{"value":"1","text":"Circuits"},{"value":"2","text":"Data"}]

But, if you view source on that page, you'll see the HTML wrapped around it.

-- hugh
 
Disabling absolutely everything seems to have worked, now just a matter of stepping through enabling bit by bit.

Thanks again.
 
The following cause the issue :

System Cache - 2.5.0 Joomla Project

and/or

System Content optimiser - 1.7.3.35 Digihaven

By disabling them both, the cascading drop down works as intended.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top