Mass Messaging in BuddyPress
[resolved] Mass Messaging page not accessible (8 posts)

  1. brucedwilliams
    Posted 3 years ago #

    When clicking on the "Mass Messaging" tab the linked page is non-existent.


  2. 1017Consulting
    Posted 3 years ago #

    This exact issue is happening with my site as well. Hopefully there is a solution, because I really need to have this functionality on my site.

  3. Kerry Carron
    Posted 3 years ago #

    Let's make it three for this issue. Happened for me just after upgrading to the WP 3.6. Since then have also added any additional updates, all is current.

    My result is that where the mass messaging area used to appear, there is a blank area. I have included a temporary screenshot for an example. http://awesomescreenshot.com/05e1mb34a0

    And help in finding resolution would be greatly appreciated. Thanks in avance.

  4. LordKhaoz
    Posted 3 years ago #

    OK since the author hasn't responded, here's how to fix this issue.

    There are actually 2 issues after the latest WP and BP version releases.

    ISSUE 1) function mass_messaging_page_screen() is not accessible from within the class that it's declared in.

    FIX: CUT (not copy) the following from where it is right now and PASTE it right after the line that says register_activation_hook(__FILE__, 'install_massmessaging'); at the very top of the code page.

    (do not leave it where you found it! Copy, delete and paste at the new location!)

    function mass_messaging_page_screen(){
        				add_action( 'bp_template_title', 'mass_messaging_page_screen_title' );
        				add_action( 'bp_template_content', 'mass_messaging_page_screen_content' );
        				bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );

    ISSUE 2) wpdb::prepare() now requires at least 2 arguments so you will get a bunch of "Warning: Missing argument 2 for wpdb::prepare(), called in...." errors once you do fix 1 above.

    FIX: The quick fix is to add ", null" inside the prepare() after the query.

    So for example:
    prepare("SOME QUERY HERE") should be modified to be: prepare("SOME QUERY HERE",null)

    You get the idea. Add a second null parameter and that's it!

    Here's a real example from the code:

    CHANGE: $blogsAll = $wpdb->get_results( $wpdb->prepare("SELECT * FROM {$wpdb->blogs} AND spam = '0' AND deleted = '0' AND archived = '0' AND public='1'") );

    TO: $blogsAll = $wpdb->get_results( $wpdb->prepare("SELECT * FROM {$wpdb->blogs} AND spam = '0' AND deleted = '0' AND archived = '0' AND public='1'",null ) );

    That's it. The mass messaging will work after that since I've tested it out my self. :D


  5. ID56
    Posted 3 years ago #

    LordKhaoz Your quick fix worked for me once I'd found all of the instances where the null was required! Thanks.

  6. GearMX
    Posted 2 years ago #

    LordKhaoz! You are amazing! Thank you for this fix! I really needed this BIG TIME!

    (I do wish my BP file attachments plug-in would work with your fix...maybe when the official update comes, it will include that function)

  7. ElbowRobo
    Plugin Author

    Posted 2 years ago #

    Please see latest update (1.1.5).

  8. brucedwilliams
    Posted 2 years ago #

    Thanks ElbowRobo!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Mass Messaging in BuddyPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.