freak3dot / wp-smart-honeypot

Wordpress plugin to reduce comment spam with a smarter honeypot.
MIT License
27 stars 4 forks source link

Uncaught TypeError: Cannot read property 'parentNode' of null #1

Open mediaformat opened 9 years ago

mediaformat commented 9 years ago

This plugin looks promising, I am however getting a js error.

Javascript error : Uncaught TypeError: Cannot read property 'parentNode' of null

Not sure why, but the getElementById("") is empty:

<script type="text/JavaScript">nscrmhp = document.getElementById(""); nscrmhpp = nscrmhp.parentNode; nscrmhppp = nscrmhpp.parentNode; nscrmhppp.parentNode.removeChild(nscrmhppp);</script>
freak3dot commented 9 years ago

Area you getting any other PHP errors?

Based on a quick look at the code, the missing bit is derived from the label_list and the honeypot selected as label. Are you using the new method for WordPress comment form?

mediaformat commented 9 years ago

I can't seem to find any info about old vs. new method. I am using twentytwelve.

freak3dot commented 9 years ago

Looks like the array of comment fields started in the twentyten theme. http://codex.wordpress.org/Function_Reference/comment_form

I'll give it a try with twentytwelve and see if I can't figure out what is going on.