• We are using BP Registration Options on a site running on Buddyboss platform and just installed Better Messages latest version to find out that we get fatal errors on users not approved yet.

    The fatal error occur on the following lines in compatibility.php:

    remove_action( 'bp_template_content', array( BP_Better_Messages_Tab(), 'content' ), 20 );
    remove_filter( 'the_content', array( BP_Better_Messages_Hooks(), 'chat_page' ), 12 );
    

    with the error messages:
    Uncaught Error: Call to undefined function BP_Better_Messages_Tab()
    or
    Uncaught Error: Call to undefined function BP_Better_Messages_Hooks()

    When I remove those lines it works. Although I guess those lines were there for a purpose.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm, they must have refactored their plugin to no longer use those functions, but it’s impossible for me to tell when. I think some time before their 2.0 release from what sleuthing I can do so far.

    I wonder if you’d be fine with adding the following to your active theme’s functions.php file, as it will hopefully un-hook our attempt for compatibility for the time being.

    remove_action( 'wp_head', 'bp_registration_remove_bp_better_messages' );
    

    @tw2113 No action is needed from your side I believe. Going to release update with fallbacks later today or tomorrow.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    @wordplus are these functions you’re wanting/intending to deprecate and/or remove? I definitely appreciate the fallback part, but we’re more than willing to amend our own code to be backward and forward compatible too.

    @tw2113 in this case I just renamed BP_Better_Messages to Better_Messages.

    I just going to add such fallbacks in next update:

    if( ! function_exists('BP_Better_Messages_Functions') ) {
        function BP_Better_Messages_Functions()
        {
            return Better_Messages_Functions();
        }
    }
    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Noted, thanks

    Thread Starter hemligg

    (@hemligg)

    Hi again!

    I just noticed that if a user is moderated and not yet approved he/she cannot access his/her mailbox. At least not if I have chosen a page as better messages location. The setting “Better Messages Location” found in “General settings” for the plugin Better Messages.

    As we send a welcome message to new members it is crucial that they can access their mailbox to read it. But that is impossible unless I comment the following line in bp-registration-options\includes\compatibility.php line 176.

    add_action( ‘wp_head’, ‘bp_registration_remove_bp_better_messages’ );

    It is very important for us that they have access to their received messages and is able to send a message to an admin. But I can understand that you would want to prevent moderated users from sending messages to other users than admins. So the best solution would probably be to check that, when trying to send a message if possible.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Added to our open issue for further exploration. I can’t guarantee anything though since it sounds like it needs to come down to conditional messaging which would be much more complex.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not compatible with Better Messages v.2.0’ is closed to new replies.