Having enabled Page Comments on a page I have noticed a JS error.
It occurs when you click anywhere on the page after having entered some text in the 'Comments' textarea.
In IE the script halts the page from submitting (very bad). In FireFox the page submits, but the error is still there, and in Firebug I can get some details about it.
The error says, "$("PageCommentInterface_Form_PostCommentForm").validate is not a function".
I have been able to track this in the SS code as far as line 216 of /sapphire/forms/Validator.php where we see this block of code:
'#$formID textarea' : {
initialise: function() {
if(!this.old_onblur) this.old_onblur = function() { return true; }
if(!this.old_onfocus) this.old_onfocus = function() { return true; }
},
onblur : function() {
if(this.old_onblur()) {
return $('$formID').validate(this);
}
}
},
...and it's the onblur call that causes the error.
Can someone advise what I can do here? (I'm running SS 2.4.0)
jf/