shawnmcginn
Member
I've opened up my form to allow users to change their email address which is also their login user name. So for the interim we can ignore the fact that it's an email address, this field value is the one that is synchronized with the joomla jos_users.username value. So basically I'm allowing them to change their login.
When a user logs in, changes this value, submits, logs out and then logs back in immediately, now using their new username, they correctly access the form, no issue with logging in but I get this 'Uncaught TypeError: Cannot read property 'addEvent' of null' (form.js line 2), I lose pagination, previously set button values (ex. radio buttons) no longer show a value and display as though they were never selected. If I reload the page everything goes back to normal.
I've narrowed it down to this block of code in the form.js. Note the object is not null but this.form (line 3) is null and the error is thrown on the line that reads this.form.addEvent("click:relay(.fabrikSubGroup)", function(a, b). I'm no js expert I'm hoping maybe this is something simple that you are aware of, even a workaround, if I could force expire the session cookie on logout maybe that would fix it?
watchGroupButtons: function() {
var b = this;
a(this.form).on("click", ".deleteGroup", d(this.options.debounceDelay, !0, function(a) {
if (a.preventDefault(),
!b.addingOrDeletingGroup) {
b.addingOrDeletingGroup = !0;
var c = a.target.getParent(".fabrikGroup")
, d = a.target.getParent(".fabrikSubGroup");
b.deleteGroup(a, c, d),
b.addingOrDeletingGroup = !1
}
})),
a(this.form).on("click", ".addGroup", d(this.options.debounceDelay, !0, function(a) {
a.preventDefault(),
b.addingOrDeletingGroup || (b.addingOrDeletingGroup = !0,
b.duplicateGroup(a, !0),
b.addingOrDeletingGroup = !1)
})),
this.form.addEvent("click:relay(.fabrikSubGroup)", function(a, b) {
var c = b.getElement(".fabrikGroupRepeater");
c && (b.addEvent("mouseenter", function() {
c.fade(1)
}),
b.addEvent("mouseleave", function() {
c.fade(.2)
}))
}
.bind(this))
},
When a user logs in, changes this value, submits, logs out and then logs back in immediately, now using their new username, they correctly access the form, no issue with logging in but I get this 'Uncaught TypeError: Cannot read property 'addEvent' of null' (form.js line 2), I lose pagination, previously set button values (ex. radio buttons) no longer show a value and display as though they were never selected. If I reload the page everything goes back to normal.
I've narrowed it down to this block of code in the form.js. Note the object is not null but this.form (line 3) is null and the error is thrown on the line that reads this.form.addEvent("click:relay(.fabrikSubGroup)", function(a, b). I'm no js expert I'm hoping maybe this is something simple that you are aware of, even a workaround, if I could force expire the session cookie on logout maybe that would fix it?
watchGroupButtons: function() {
var b = this;
a(this.form).on("click", ".deleteGroup", d(this.options.debounceDelay, !0, function(a) {
if (a.preventDefault(),
!b.addingOrDeletingGroup) {
b.addingOrDeletingGroup = !0;
var c = a.target.getParent(".fabrikGroup")
, d = a.target.getParent(".fabrikSubGroup");
b.deleteGroup(a, c, d),
b.addingOrDeletingGroup = !1
}
})),
a(this.form).on("click", ".addGroup", d(this.options.debounceDelay, !0, function(a) {
a.preventDefault(),
b.addingOrDeletingGroup || (b.addingOrDeletingGroup = !0,
b.duplicateGroup(a, !0),
b.addingOrDeletingGroup = !1)
})),
this.form.addEvent("click:relay(.fabrikSubGroup)", function(a, b) {
var c = b.getElement(".fabrikGroupRepeater");
c && (b.addEvent("mouseenter", function() {
c.fade(1)
}),
b.addEvent("mouseleave", function() {
c.fade(.2)
}))
}
.bind(this))
},