WordPress.org

Ready to get started?Download WordPress

Forums

WP-Polls
Problem with wp-polls.php, error 500 (4 posts)

  1. Esteban
    Member
    Posted 1 year ago #

    Hi,

    I just hit this error with the 2.63 version of wp-polls:
    PHP Fatal error: Call to undefined function add_action() in /*/wp-content/plugins/wp-polls/wp-polls.php on line 31
    Trying to vote, never works for that. Chrome says there was an error 500 on wp-polls.php

    After digging for a while, i realize that 2.63 it's called directly by this code:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var pollsL10n = {
    	ajax_url: "http://www.cdf.cl/wp-content/plugins/wp-polls/wp-polls.php",
    	text_wait: "Tu ultima solicitud esta siendo procesada, por favor espera...",
    	text_valid: "Por favor selecciona una respuesta valida.",
    	text_multiple: "Numero maximo de respuestas permitidas: ",
    	show_loading: "1",
    	show_fading: "1"
    };
    /* ]]> */
    </script>

    Then, doing a comparison of both version, 2.63 and 2.62 or 2.61, i realize you don't include this on top of wp-polls.php file:

    ### Load WP-Config File If This File Is Called Directly
    if (!function_exists('add_action')) {
    	$wp_root = '../../..';
    	if (file_exists($wp_root.'/wp-load.php')) {
    		require_once($wp_root.'/wp-load.php');
    	} else {
    		require_once($wp_root.'/wp-config.php');
    	}
    }

    So i add those lines myself, reupload wp-polls.php, and... it works again.

    Hopefully this can be fixed soon ;)
    Great plugin :)

    http://wordpress.org/extend/plugins/wp-polls/

  2. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

  3. Esteban
    Member
    Posted 1 year ago #

    I was using 2.63... and still it was calling wp-polls.php instead admin-ajax.php.

    And yes, i read those links before. Thanks.

    None of those three problems was afecting us. Our plugin still was calling wp-polls.php. No “-1″ or “Failed To Verify Referrer”, no Password Protected /wp-admin/ and no HTTPS/HTTP also.

    Odd.

  4. Lester Chan
    Member
    Plugin Author

    Posted 1 year ago #

    That is not possible, it must be some cache on your end. To be sure, redownload the plugin and overwrite it again. Try the default twentyeleven theme

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic