Support » Plugin: WP-Polls » Warning: Cannot modify header information – headers already sent by

  • Resolved Jamesvan

    (@jamesvan)


    I am running wp 3.7.1 and wp-polls 2.63

    For a logged in user, they can click the “View Results” link and the result graph is displayed.

    For a non-logged in user, if they click the “View Results” link, the result graph is displayed. But also get the following message above of the poll results graph:

    Warning: Invalid argument supplied for foreach() in /home/blah/public_html/wp-admin/includes/plugin.php on line 1365

    Warning: Cannot modify header information – headers already sent by (output started at /home/blah/public_html/wp-admin/includes/plugin.php:1365) in /home/blah/public_html/wp-content/plugins/wp-polls/wp-polls.php on line 1279
    How many events do you attend throughout the year?

    I have tried deactivating plugins.
    I have tried looking for spaces (between <?php and ?>) in plugin.php
    I have tried uninstalling and re-installing the wp-polls plugin
    Not sure what else to check.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Unfortunately I have no solution to that. You might need to deactivate ALL plugin first, switch to the default WordPress bundled theme and then activate WP-Polls to see if it gives you the error.

    Thread Starter Jamesvan

    (@jamesvan)

    Hi Lester,
    Is this kind of issue seen most often if there is a plugin conflict?

    Plugin Author Lester Chan

    (@gamerz)

    yeap, most probably.

    Thread Starter Jamesvan

    (@jamesvan)

    The Conflict was between wp-polls and jetpack-only-for-admins

    The issue appeared whenever a non-logged in user would click “View Results”

    Warning: Cannot modify header information – headers already sent by (output started at /home/blah/public_html/wp-admin/includes/plugin.php:1365) in /home/blah/public_html/wp-content/plugins/wp-polls/wp-polls.php on line 1279

    To resolve:
    I uninstalled jetpack-only-for-admins and used the code below instead.
    function ap_remove_jetpack_page( ) {
    if ( class_exists( ‘Jetpack’ ) && !current_user_can( ‘manage_options’ ) ) {
    remove_menu_page( ‘jetpack’ );
    }
    }
    add_action( ‘admin_menu’, ‘ap_remove_jetpack_page’, 999 );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning: Cannot modify header information – headers already sent by’ is closed to new replies.