Possible bug in the cascade function for Dadabik 8.3 and 9.2.1.

  • Thread starter Deleted member 75341
  • Start date
D

Deleted member 75341

Guest
Good Morning Mr. Eugenio,
seems that I found a bug in the cascade function for Dadabik 8.3 and 9.2.1

Synthesis: If a field is depending of another one (cascade function) and the cascade field is hidden (not visible) the form will freeze with the ajax loader visible.

Scenario:
The form has about 30 fields including:
1) Province.
2) Municipality.
The "Municipality" field contains the fk of the "Province" field (id_provincia)
The cascade function is activated for the "Municipality" field.

If both fields are visible in the same form, no problem occurs. Selecting the "Province" the relative "Municipalities" are filtered and it is possible to scroll the page and fill in all the form fields.

Instead If we want to hide the "Municipality" field (cascade one dependent of the "Province" field) to a specific users group (in the field permissions we set "NO" for the field "Municipality" for the user group we want to prevent the vision), in phase of insertion, selecting the "Province" the form will freeze with the ajax loader visible and it isn't possible to scroll down the page to fill all the other remaining fields present.

I hope I was clear about the issue.
Let me know.
Thank you in advance.
 

eugenio

Administrator
Staff member
Hello,
I confirm I can reproduce the issue.

A quick fix (I haven't tested it carefully but it should work):

- open include/header.php and search the function refresh_cascade_children.

- inside this function you have this line of code:
$.each(data.fields, function(key, val) {

- just before such line, add this one:
if (typeof data.fields !== 'undefined'){

- close the if statement you just opened adding a line containing just a } before this line:
enable_disable_loader('disable');
(I mean the first enable_disable_loader('disable') you have in the function).

The issue will be officially fixed in the next release.

Best,
 
D

Deleted member 75341

Guest
Thank you Mr.Eugenio,
the fix solved the problem !!
 
Top