WordPress.org

Ready to get started?Download WordPress

Forums

Bad Behavior
[resolved] Bad Behavior Plugin Warning Message (19 posts)

  1. genegem
    Member
    Posted 1 year ago #

    Just updated and got warning message (see below) so deactivated. Is there a bug in the latest update?

    Warning: Invalid argument supplied for foreach() in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php on line 176

    Warning: Cannot modify header information - headers already sent by (output started at /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/screener.inc.php on line 9

    Thank you for contacting HostGator. There is an error in the code for the plugin as I see the same error for a test WordPress installation. I suggest you contact the developer of the plugin at http://wordpress.org/support/plugin/bad-behavior in regards to this issue.

    If you have any questions or concerns, please don't hesitate to contact us. We are more than happy to assist you.

    Best regards,

    Samuel H.
    Linux Systems Administrator
    HostGator.com LLC

    http://wordpress.org/extend/plugins/bad-behavior/

  2. Warning: Cannot modify header information - headers already sent by

    Please give this a read.

    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    And double check your wp-config.php file. Somewhere there is a white space in it.

  3. genegem
    Member
    Posted 1 year ago #

    Thank You. I'm not a coder so no point me looking for spaces whether black, white or purple. Wasn't a problem before the update so was simpler just to deactivate and delete.

  4. genegem
    Member
    Posted 1 year ago #

    Obviously a fault in the update because previous versions didn't give these errors so I guess it's simpler to stop using it and delete it altogether until the developer sorts out his bugs.

  5. That is your choice of course, and my advice is always "you should do what you want". ;)

    But I've just installed the version 2.2.9 of that plugin. The plugin is fine and it is probably your wp-config.php file. 99.999% of the time that's the culprit.

  6. zicocarioca
    Member
    Posted 1 year ago #

    Hi...
    I tried the proposed solution above and it didn't work. I think I did the whole thing just right, but nothing... It just didn't work.

    Also, no apparently meaningful white spaces found on the described code.
    I don't think I can find a solution by myself.

    Some help will be kindly appreciated.

    Can anyone please take me back to the previous version of BadBehavior? I just can't find a link to the version 2.2.8

    Thanks in advance!

  7. Looks like you're not alone alright.

    See this reply for more details on how to check your wp-config.php file (if that's it or not).

    http://wordpress.org/support/topic/plugin-bad-behavior-latest-update-broke-my-site?replies=2#post-3129787

    @zicocarioca, the older versions can be manually downloaded from the Developers tab on that page.

    http://wordpress.org/extend/plugins/bad-behavior/developers/

    The link for 2.2.8 is http://downloads.wordpress.org/plugin/bad-behavior.2.2.8.zip

  8. zicocarioca
    Member
    Posted 1 year ago #

    Thanks a lot for the help and also the link @Jan!
    Somehow I couldn't think of such a simple yet clever way to find that version again.

    Cheers!

    P.S: Even though I'm not a coder I suspect there's some conflict between the most recent version of BadBehavior (2.2.9) and some other installed plugin.

  9. P.S: Even though I'm not a coder I suspect there's some conflict between the most recent version of BadBehavior (2.2.9) and some other installed plugin.

    That may be possible, but normally when that happens you get a different error message. The "Warning: Cannot modify header information - headers already sent by" error message is almost always either a problem with the wp-config.php file or some other file adding a white space.

  10. fisnollo
    Member
    Posted 1 year ago #

    The link you reference says "This could be true about some other file too, so please check the error message, as it will list the specific file name where the error occurred".

    In my case, the error refers to the blacklist.inc.php file, so doesn't that mean that's where the error is originating from, not the config file?

  11. In my case, the error refers to the blacklist.inc.php file, so doesn't that mean that's where the error is originating from, not the config file?

    Sort of. Kinda. Ish.

    I know, that's not really helpful but I'll explain, probably poorly. ;) For now, consider manually rolling back to the earlier version.

    This is a specific to that file error message.

    Warning: Invalid argument supplied for foreach() in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php on line 176

    That's saying there is a problem with the foreach() in that file which is good error message 'cause it's saying "THERE on line 176 of that file".

    This is a brain teaser error message.

    Warning: Cannot modify header information - headers already sent by (output started at /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/screener.inc.php on line 9

    The reason it's a brain teaser is that it's telling you that something else sent the headers already when processing the files blacklist.inc.php and screener.inc.php which is good but you don't know what sent the headers already.

    It could be and usually is the wp-config.php file. Or it could some other file in the Bad Behavior plugin that was processed already.

    Since this is being reported by several people, it might be the plugin (odds are good) but checking your wp-config.php file as I outlined never hurts either.

  12. 411plumb
    Member
    Posted 1 year ago #

    I've got the same error as everyone else.

    Warning: Invalid argument supplied for foreach() in /home/*****/public_html/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php on line 176

    Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/*****/public_html/wp-content/plugins/bad-behavior/bad-behavior/screener.inc.php on line 9

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/*****/public_html/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/*****/public_html/wp-content/plugins/si-contact-form/si-contact-form.php on line 2189

    There are no white spaces in the wp-config file, the update is broken it is that simple. Deactivating the plug-in in the plug-ins page on the dashboard will remove the problem, and I have reverted to the old version for now. Will watch for a bug update before installing an update.

  13. zicocarioca
    Member
    Posted 1 year ago #

    It might help: I don't know how to explain this correctly but I'd like to tell you what I did in order to get rid of the BadBehavior 2.2.9 update bug.

    After trying to fix the <a href="http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F">cannot modify header</a> blablabla bug and performing some sort of [search and destroy] extra white spaces on the conflicting files (inluding the wp_config.php file) without success, I decided to delete the BadBehavior pluging via FTP and reinstalled the 2.2.8 version.

    Later, I realised that even though the main problem was solved I was still experiencing this silly nightmare on my dashboard since I was reading the same error as a header on every single feed... for example on: "recent drafts", "WordPress Blog", "Plugins" and also on "Other WordPress News"... SO WHAT did I do?

    Simple:
    1) Emptied every single cache. I use W3TC.
    2) Purged the cache in CloudFlare too. [If you use CloudFlare, remember to activate the reverse proxy thing on the BadBehavior settings panel]
    3) And finally, since the problem seemed to persist, I also deleted the storaged cache on my own disk via the Options menu in Firefox, since it's the web browser I was using along this process.

    Now everything seems to work just fine.

    Of course, I know this is not a proper fix for the 2.2.9 update bug BUT AT LEAST I'm running the BadBehavior 2.2.8 plugin again. I'll wait and see.

    I hope this helps.
    Cheers from Barcelona!

  14. Jonathan UK
    Member
    Posted 1 year ago #

    Come on Jan, aren't you're ready to concede yet? ;)

    I'm no coder, but surely this is a buggy upgrade? When I applied the upgrade, my site broke. When I deactivated it (and later, when I deleted it and restored the 2.2.8 version), my site worked again.

    Thank you for the link to the various versions - I didn't know where to find it, but am now very pleased to have been able to restore a working version.

  15. pbeckley
    Member
    Posted 1 year ago #

    2.2.9 contains a typo in the blacklist.inc.php

    the last foreach loop says

    foreach ($bb2_spambots_utl as $spambot)

    it should say

    foreach ($bb2_spambots_url as $spambot)

    I know not everyone feels comfortable changing things like this themselves, but you can do it from the plugin editor inside WordPress if you're adventurous enough.

  16. fisnollo
    Member
    Posted 1 year ago #

    Thanks pbeckley, that fix worked for me.

  17. Come on Jan, aren't you're ready to concede yet? ;)

    Hey, I'm just glad someone came up with a fix. ;)

    I'm sure an update will be around soon enough.

  18. 411plumb
    Member
    Posted 1 year ago #

    Upgraded 2.2.10 on 15 sites with 7 different themes and 2 of them are multisites....

    All is good! Thanks!

    For those of you that had problems and were trying to get a copy of the old version, you really should learn how to back up the files and database of your websites.

  19. error
    Member
    Plugin Author

    Posted 1 year ago #

    This was fixed in 2.2.10, as noted above.

    Remember that this is not a good support channel for Bad Behavior; you should contact the author directly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic