Download & Extend

WSOD after vote submitted on IE 8 (jQuery update to 1.3.2)

Project:Advanced Poll
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

After a vote was cast on IE 8, I got a WSOD from IE 8 due to an error being generated. Those are at [1]. Line 25 is '$(".form-submit", thisForm).removeAttr("disabled")', but the problem seems to be more related to '$(data.response).insertBefore(thisForm)'. My emergency fix (since I'd already published the node) was to replace that line with the following:

if ( typeof data.response != 'undefined' && data.response ) {
$(data.response).insertBefore(thisForm);
}
else {
$('<div>Your vote was cast, please check back later.</div>').insertBefore(thisForm);
}

Now, that results in two success messages being printed (one from me, plus the original one from the advpoll module). But, at least it doesn't result in a WSOD on IE.

Firebug shows that data.response is an empty string; is the code above being run twice and does IE not like data.response for one of those times?

Note that I'm using the jQuery Update that updates jQuery to 1.3.2. I'm also using a custom .tpl.php for the node in question (copied from one I was using for the thousands of nodes at my site), but it doesn't seem like that should make a difference. It does have a "div.messages" and a ".form-submit".

[1] Message: Object required
Line: 2339
Char: 2
Code: 0
URI: [URL]/jquery_update/replace/jquery.js?Y

Message: Object doesn't support this property or method
Line: 25
Char: 3
Code: 0
URI: [URL]/advpoll/advpoll-vote.js?Y