ptrovatelli
New Member
Got that error when trying to load a form that was defined in previous versions of joomla / fabrik:
the page is blank and javascript console says:
Uncaught TypeError: document.getElements(...)[0] is undefined
It is in form.js line 897 (got the unminified version of the file by activating joomla and fabrik debug)
The error is on this line:
Everything worked with :
- joomla 4.3.2 / fabrik 4.0gamma3
Got the error with the below versions so it makes me think it's an issue with joomla 4.4 :
- joomla 4.4.0 / fabrik 4.0gamma3
- joomla 4.4.3 / fabrik 4.0gamma3
- joomla 4.4.3 / fabrik 4.0 (final)
the page is blank and javascript console says:
Uncaught TypeError: document.getElements(...)[0] is undefined
It is in form.js line 897 (got the unminified version of the file by activating joomla and fabrik debug)
addElements: function (a) {
/*
* Store the newly added elements so we can call attachedToForm only on new elements.
* Avoids issue with cdd in repeat groups resetting themselves when you add a new group
*/
var added = [], i = 0;
a = $H(a);
a.each(function (elements, gid) {
elements.each(function (el) {
if (typeOf(el) === 'array') {
if (typeOf(document.id(el[1])) === 'null') {
/* Some elements may not exist if this is a new record, specifically the lockrow element */
if (document.getElements('input[name=rowid]')[0].value != "" && el[0] != 'FbLockrow') {
fconsole('Fabrik form::addElements: Cannot add element "' + el[1] +
'" because it does not exist in HTML.');
}
return;
The error is on this line:
if (document.getElements('input[name=rowid]')[0].value != "" && el[0] != 'FbLockrow') {
Everything worked with :
- joomla 4.3.2 / fabrik 4.0gamma3
Got the error with the below versions so it makes me think it's an issue with joomla 4.4 :
- joomla 4.4.0 / fabrik 4.0gamma3
- joomla 4.4.3 / fabrik 4.0gamma3
- joomla 4.4.3 / fabrik 4.0 (final)