• Resolved festsoft

    (@festsoft)


    When plugin is activated I get these messages on the dashboard.
    They disappear when deactivated.
    —-
    Warning: Cannot modify header information – headers already sent by (output started at /home/content/76/10978276/html/wp-content/plugins/svg-vector-icon-plugin/wordpress-svg-icons-plugin.php:8811) in /home/content/76/10978276/html/wp-includes/pluggable.php on line 896

    The plugin generated 2 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
    —-
    I would be grateful for any help. I am relatively inexperienced with WordPress. Thank you. David Johnson

    https://www.ads-software.com/plugins/svg-vector-icon-plugin/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hey David

    I am looking into the issue and will push out an update when it is resolved. Sorry for any issues.

    Evan

    Plugin Author Evan Herman

    (@eherman24)

    I just updated the plugin on two other sites I am running and am not seeing the issue there. Are you able to open up and check what is happening in that file on that line specified?

    Thread Starter festsoft

    (@festsoft)

    Code extract from wp-includes/pluggable.php
    The line 896 is the header(…) fn 5 lines from the end
    (Thanks for looking at this so promptly. My version is 2.3)

    if ( !function_exists('wp_redirect') ) :
    /**
     * Redirects to another page.
     *
     * @since 1.5.1
     * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
     *
     * @param string $location The path to redirect to.
     * @param int $status Status code to use.
     * @return bool False if $location is not provided, true otherwise.
     */
    function wp_redirect($location, $status = 302) {
    	global $is_IIS;
    
    	/**
    	 * Filter the redirect location.
    	 *
    	 * @since 2.1.0
    	 *
    	 * @param string $location The path to redirect to.
    	 * @param int    $status   Status code to use.
    	 */
    	$location = apply_filters( 'wp_redirect', $location, $status );
    
    	/**
    	 * Filter the redirect status code.
    	 *
    	 * @since 2.3.0
    	 *
    	 * @param int    $status   Status code to use.
    	 * @param string $location The path to redirect to.
    	 */
    	$status = apply_filters( 'wp_redirect_status', $status, $location );
    
    	if ( ! $location )
    		return false;
    
    	$location = wp_sanitize_redirect($location);
    
    	if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' )
    		status_header($status); // This causes problems on IIS and some FastCGI setups
    
    	header("Location: $location", true, $status);
    
    	return true;
    }
    endif;

    The issue is in wp-content/plugins/svg-vector-icon-plugin/wordpress-svg-icons-plugin.php – not pluggable.php. Try reviewing Solving “headers already sent” warnings.

    Thread Starter festsoft

    (@festsoft)

    It was on line 8811 of wordpress-svg-icons-plugin.php

    <?php
    
    }
    ?>
    
    <?php     //This is line 8811
    
    function wp_svg_icons_upload_custom_pack_callback() {
    
    ?>

    By deleting ?>…<?php the problem seems to be resolved. Activation now goes to the page full of icons…

    Thanks to both…

    Plugin Author Evan Herman

    (@eherman24)

    Ah yea its because I closed out a php function and opened one immediatly following it.

    <?php
    
    }
    ?>
    
    <?php     //This is line 8811
    
    function wp_svg_icons_upload_custom_pack_callback() {
    
    ?>

    Should be

    <?php
    
    }
    
    function wp_svg_icons_upload_custom_pack_callback() {
    
    ?>

    Thank you for pin pointing the issue. I will push out an update, possibly on my lunch break. Thanks again!

    Evan

    Plugin Author Evan Herman

    (@eherman24)

    Hey David,

    I’ve just pushed out the newest patch for the plugin which should resolve the issue. I know you have sorted things out yourself, but for future releases this problem should be resolved. Again, sorry about that.

    Evan

    Thread Starter festsoft

    (@festsoft)

    Thanks Evan, and thanks to esmi I now understand how to begin to interpret the mysterious ‘headers already sent’ messages!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error message when activated’ is closed to new replies.