Support » Plugin: bbPress Notify (No Spam) » New bbPress 2.5.4 crashes on bbpress-notify-nospam

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Vinny

    (@usestrict)

    Thanks for letting me know. I’ll investigate and provide a patch tomorrow. Most likely our friends at bbpress removed the method in version 2.5.4, breaking it. So much for backward compatibility!

    I think that I found what could be the problem.
    Seems that during an upgrade plugins are being disabled (upgraded bbpress, but it disabled your plugin as well). However, after completing the upgrade never or incorrectly activated the plugins.
    To fix it, I had to disable your plugin, downgrade bbpress manually to get back in to the admin pages, upgrade bbpress again, and then enable the plugin again.
    There are probably easier step to do this, but since it took down my entire website, I tried everyting to get it back up asap.
    bbpress 2.5.4 + bbpress-notify-nospam seems to work correctly now.

    Plugin Author Vinny

    (@usestrict)

    I had a quick look at bbpress’ 2.5.4 code and the function declaration is there. It might have been a race condition, so I’ll put in a patch anyway to avoid it in the future.

    Same story here. My suggestion would be to include a check if bbPress is actually active, since I could not find any such code in the plugin file. You could either use if ( function_exists('bbpress') ) { // do bootstrap } or run bootstrap through hooking in the bbp_init or bbp_loaded action. Thanks in advance.

    PS. If there’s one thing you cannot say the WP/BBP/BP people don’t care about, it’s backwards compat! My suggestion would be to always look at your own code first.

    Plugin Author Vinny

    (@usestrict)

    Hi Laurens,

    My code checks whether BBP is installed and deactivates itself upon activation as you can see below.

    register_activation_hook(__FILE__, array(&$this,'on_activation'));
    ...
            function on_activation()
    	{
    		if(!class_exists('bbPress'))
    		{
    			deactivate_plugins(plugin_basename(__FILE__));
    			wp_die( __('Sorry, you need to activate bbPress first.', 'bbpress_notify'));
    		}

    The error for function bbp_get_topic_post_type happened inside a method that is only called at plugins_loaded, so it really should not be happening (and wasn’t until bbp 2.5.4).

    If you check my __construct(), aside from is_admin() and a couple of get_option() calls, all it does is set actions and filters. I don’t know what BBP folks did that caused this, but there have been no changes to my code that would have caused it, nor does it look to me that I’m doing something stupid like calling the function before BBP gets loaded.

    Regardless, thank you for your suggestion. I’ll see what I can do about this.

    Plugin Author Vinny

    (@usestrict)

    Ok, this is what seems to have happened: when the user first activates BBPNNS, it checks if BBP is installed and dies if it isn’t. So the user goes in and installs BBP (if he hadn’t already) and then installs/activates BBPNNS. WP seems to save the order in which the plugins were activated (I haven’t checked to be sure) and when this order goes awry (like after upgrading BBP), BBPNNS starts getting loaded before BBP.

    I’ve added a check in the bootstrap to handle that. The update (v. 1.5.4) will be available soon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘New bbPress 2.5.4 crashes on bbpress-notify-nospam’ is closed to new replies.