WordPress.org

Support

Support » Plugins and Hacks » AdRotate » [Plugin: AdRotate] Unexpected output error during activation

[Plugin: AdRotate] Unexpected output error during activation

  • After activating this plugin, I got this message. Not sure what it means!

    The plugin generated 5225 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.

    http://wordpress.org/extend/plugins/adrotate/

Viewing 9 replies - 1 through 9 (of 9 total)
  • I think this error might be erroneous. Users are reporting the same problem for the WP Mail SMTP plugin I developed, but I can’t figure out why. The plugin works fine and doesn’t appear to output anything. I think it might be an issue in WordPress rather than the plugin, but I’m not 100% sure. You could try asking the plugin author directly.

    It’s not erroneous. Mine generated over 10k chars of unexpected output. And the number of impression is not accurate. Not an issue in WP cos other plugins that generated same error managed to rectify their own plugins

    groomedmonkey

    @groomedmonkey

    Yeah I get the error in WP 3.0.1 as well. Not sure I feel comfortable using this plugin with that error:

    “he plugin generated 11082 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 have this problem too

    This is happening for me as well. Any word on what is causing this or a fix?

    shazahm1

    @shazahm1hotmailcom

    Well, I spent a couple hours to figure this out because the error on activation bugged me. It was kind of fun to figure out how to make WP actually show you the error instead of “helpfully” hiding it…

    After the tables are created the plugin activation runs thru the table columns making sure the columns exist and adds them if they don’t. My guess is that this really the upgrade routine to bring older table structures up to date for the current version of AdRotate. So if the user is installing the current version there is no upgrade required and the plugin will function correctly and the error can be ignored, however if a user is upgrading from a previous version the plugin will not function correctly because the tables will not have all the correct columns.

    So here’s the fix:

    In the adrotate-setup.php change lines 81 thru 86 from

    $i = 0;
    while ($row = mysql_fetch_assoc($result)) {
    	$field_array[] = mysql_field_name($row, $i);
            $i++;
    }

    to

    //$i = 0;
    while ($row = mysql_fetch_assoc($result)) {
    	//$field_array[] = mysql_field_name($row, $i);
    	$field_array[] = $row['Field'];
            //$i++;
    }

    Now do the same for lines 132 thru 137 and 151 thru 156. That should fix the activation error and still upgrade previous versions of AdRotate correctly.

    eliteeternity

    @eliteeternity

    you are the bomb (guy above me). Worked like a charm. Thank you.

    I have tied this in my events plugin but still giving me warning like this :
    The plugin generated 836 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.

    any solution ???

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: AdRotate] Unexpected output error during activation’ is closed to new replies.
Skip to toolbar