getElement(".loader") is null on calc

softforge

Member
After updating from github yesterday, I am now getting the following error when some forms load:

Error: TypeError: this.element.getParent().getElement(".loader") is null
Source File: /plugins/fabrik_element/calc/calc-min.js
Line: 1

This seems to be related to the AJAX calculation as it no longer works. You can see an example on the diabetes site here:

/self-monitoring/alcohol/add-new

Any ideas?

Many thanks
 
sorry I'm not sure what site you are referrring to with /self-monitoring/alcohol/add-new ?
 
well ok its the diabetes site, but I get a 500 error for that page:

'Layout default not found'

Check you have a template assigned for that page.
 
OK, I think you have identified another bug. There is definitely a template assigned and that page works fine when you are logged in but gives a 500 when you are not. Surly that shouldn't happen.

I have just PMed you super admin access. Would you mind logging in on the home page and then having another look?

Many thanks :)
 
I've just updated from github but the problem still occurs, the error message is now:

Error: TypeError: this.element.getParent().getElement(".loader") is null
Source File: /plugins/fabrik_element/calc/calc.js
Line: 92

It's a bit hacky but I have bypassed the issue by changing this line:

Code:
this.element.getParent().getElement('.loader').setStyle('display', 'none');
And this line:
Code:
this.element.getParent().getElement('.loader').setStyle('display', '');
To this:
Code:
if($defined(this.element.getParent().getElement('.loader'))) {
    this.element.getParent().getElement('.loader').setStyle('display', 'none');
}
And this:
Code:
if($defined(this.element.getParent().getElement('.loader'))) {
    this.element.getParent().getElement('.loader').setStyle('display', '');
}
I'm sure there is a better way but it works for now.

The 500 template error when you are not logged in is still a mystery.... ???
 
Hello

could you double check the update? On your previous post it seemed what you were posting suggested that the update was not successful, or that you hadn't cleared your browser cache?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top