Viewing 1 replies (of 1 total)
  • I’ve had the same problem on IE7 after I upgraded to WordPress 3.3.1

    In plugins/wp-polls/wp-polls.php change lines 294 to 304 from

    echo "\t\t".'var qt_button = qt_toolbar.lastChild;'."\n";
    echo "\t\t".'while (qt_button.nodeType != 1){'."\n";
    echo "\t\t\t".'qt_button = qt_button.previousSibling;'."\n";
    echo "\t\t".'}'."\n";
    echo "\t\t".'qt_button = qt_button.cloneNode(true);'."\n";
    echo "\t\t".'qt_button.value = pollsEdL10n.poll;'."\n";
    echo "\t\t".'qt_button.title = pollsEdL10n.insert_poll;'."\n";
    echo "\t\t".'qt_button.onclick = function () { insertPoll(\'code\', edCanvas);}'."\n";
    echo "\t\t".'qt_button.id = "ed_poll";'."\n";
    echo "\t\t".'qt_toolbar.appendChild(qt_button);'."\n";
    echo "\t".'}'."\n";

    to

    echo "\t\t".'var qt_button = qt_toolbar.lastChild;'."\n";
    echo "\t\t".'if(qt_button != null){'."\n";
    echo "\t\t\t".'while (qt_button.nodeType != 1){'."\n";
    echo "\t\t\t\t".'qt_button = qt_button.previousSibling;'."\n";
    echo "\t\t\t".'}'."\n";
    echo "\t\t\t".'qt_button = qt_button.cloneNode(true);'."\n";
    echo "\t\t\t".'qt_button.value = pollsEdL10n.poll;'."\n";
    echo "\t\t\t".'qt_button.title = pollsEdL10n.insert_poll;'."\n";
    echo "\t\t\t".'qt_button.onclick = function () { insertPoll(\'code\', edCanvas);}'."\n";
    echo "\t\t\t".'qt_button.id = "ed_poll";'."\n";
    echo "\t\t\t".'qt_toolbar.appendChild(qt_button);'."\n";
    echo "\t\t".'}'."\n";
    echo "\t".'}'."\n";

    After this change, the Poll button in HTML editor won’t work anymore. But as I don’t need it, this fix is fine for me.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Polls] TypeError: 'null' is not an object (evaluating 'qt_button.nodeType’ is closed to new replies.