WordPress.org

Ready to get started?Download WordPress

Forums

WP-Polls
[resolved] Warning: Cannot modify header information - headers already sent by (5 posts)

  1. Jamesvan
    Member
    Posted 9 months ago #

    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/

  2. Lester Chan
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  3. Jamesvan
    Member
    Posted 9 months ago #

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

  4. Lester Chan
    Member
    Plugin Author

    Posted 9 months ago #

    yeap, most probably.

  5. Jamesvan
    Member
    Posted 9 months ago #

    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 );

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.