JS error on form saving

liorbd

New Member
hi,
i an trying to create a new form but wher i try to save it, i got this JS error
"Uncaught ReferenceError: controller is not defined".

i also get this message on page load:
"Uncaught TypeError: Cannot call method 'addEvent' of null"

is there any fix for that?

thanks
 
Which exact fabrik version are you running? (Download, GitHub)?
Did you try to clear all browser cache, Joomla cache...?
 
Ok, I can confirm this, but it's very strange.
I have two test sites at my localhost, both J!2.5.6, both running latest GitHub (or reset to 3.0.6.1, no difference)
one site is ok
the other one is showing your errors
uncaught TypeError: Cannot call method 'addEvent' of null
swaplist.js:7
when opening the new form
Uncaught ReferenceError: controller is not defined
when saving

This seems to be realated
http://fabrikar.com/forums/showthread.php?t=28056&page=2

Something for the Fabrik guys.
 
Can you try changing line 7 in ./administrator/components/com_fabrik/models/fields/swaplist.js to:

Code:
		if (typeOf(document.id(addbutton)) !== 'null') {

... and see if that fixes it? You'll have to have J! debug enabled so it uses the uncompressed JS files (or I think you can now use the new Fabrik Debug global param setting I added, for "Debug JS", which I had to add because that stupid J! session error that randomly errors out with a 500 when in debug mode, if you have more than 2 or 3 AJAX calls firing in quick succession).

-- hugh
 
Yes, this does it.

BTW: it isn't loading swaplist-min.js at all, no matter what the debug settings are (in the frontend you can see the different loading of xx.js and xx-min.js if switching JS debug on/off)
 
Hmmm, oh well. I think the way we include backend admin JS may be different.

OK, I'll commit that fix.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top