tomasdev

web development handcrafted

WP-Polls 2.50 common errors

23 Sep, 2009. Written by Tom Roggero

I think the most common error is to get the poll but it doesn't work. I mean all options are displayed, but when hitting the button Vote! nothing happens.
This is caused because of the jQuery JS library for WordPress Polls didn't load correctly. So, if you have Firebug and Console enabled for the web, you will see the error:
poll_vote is not defined
To fix it, there are some differents solutions, because it could be caused by more than just one mistake.
FIRST: Ensure your template uses the wp_head(); function.
SECOND: Ensure your template uses the

<?php do_action('wp_footer'); ?>

-or-

<?php wp_footer(); ?>

THIRD: (just for advanced users, in case that the first and second didn't work for you) Edit your /wp-content/plugins/wp-polls/wp-polls.php file, search

wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), '2.50', true);

and replace where it says true for false so it looks like

wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), '2.50', false);

Hope you fixed it, anyway you can comment above and tell me, if I know, I'll tell you the solved code.

33 Comments /

jon
05/10/2009

Not sure what you mean by the first and second fixes. I did the last one but am spacing for some reason on figuring this out.

Tomas
08/10/2009

WordPress uses templates (files for specific functions) in themes developing. Well, first is, you have to check in your header.php if wp_head is there. Second, same thing for footer.php

sebastian
29/10/2009

thanks a ton for this hints! worked like a charm.

Horny Bunny
11/11/2009

Oh, thanks you very much. I’ve asked so many people, but no one can help me to fix this bug! Third step of your solution help me now.

Duane
01/03/2010

Thanks Tom this one had me going for a while

Fernando
29/03/2010

Thanks tom

It worked perfectly.

Cristian
31/03/2010

Thankssss, it’s works fine with this hints!!

yohaas
27/04/2010

Thanks, adding worked great!

Igor
14/05/2010

Thanks work fine!

bingomaster
20/05/2010

thx thx thx !!!!!
i’ve search so long, i’ve made a custom design but i’ve forgot wp_footer() … THX

Maher
31/08/2010

Perfect! Last solution worked well

Gary
21/10/2010

Thanks for the fix… The third one worked… modify the function call arg to false….

Awesome…

Ryan
05/11/2010

The 3rd solution worked for me also. Thanks!

Alejandro
08/11/2010

Excelente pude solucionarlo agregando la función al footer, muchas gracias. Saludos desde Colombia.

Andres
27/12/2010

Muchas gracias maestro, no sabes cómo me solucionaste la vida!!!!
capo totall. Funcionó con la tercera opción.

Ariel
24/02/2011

Eres un genio mi viejo, no sabes como me ayudaste. La 3a solucion funciono para mi

ad
14/03/2011

thanks!!

Eugene
09/04/2011

Thanks for the fix. The third one worked.

terumu
02/05/2011

Thanks for your fix, it really helped a lot.

Hugo Dias
27/12/2011

Awesome man, work like a charm

Akbar
03/02/2012

Thanks you very much for this solution. its works

Great job man.

ryad
09/05/2012

Doesn’t work for me .
i have wp-head(); in header.php and wp-footer() in footer.php . I also change true for false but still not working
Please , have you another idea ? i very need to fix this probleme quickly .

bye th way , how i can display vote of all polls in pollsarchive ? i mean not only results

Nigel Howarth
10/05/2012

Thanks – The third solution also worked for me. Interestingly, the error only occurred with MSIE – everything was fine in Firefox and Chrome.

shell
19/05/2012

yup.. 3rd solution works .!!!!! many thanks..!!!!

Leave a Reply