WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Pending Activations
[resolved] Error In Admin Section Dashboard (14 posts)

  1. salvig67
    Member
    Posted 1 year ago #

    Ever since the update this code popped up.

    The plugin still works only has something going on since wordpress was updated.

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/56/7721756/html/blist/wp-content/plugins/buddypress-pending-activations/bp-pending-activations.php on line 18 and defined in /home/content/56/7721756/html/blist/wp-includes/wp-db.php on line 990

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/56/7721756/html/blist/wp-includes/wp-db.php:990) in /home/content/56/7721756/html/blist/wp-includes/option.php on line 568

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/56/7721756/html/blist/wp-includes/wp-db.php:990) in /home/content/56/7721756/html/blist/wp-includes/option.php on line 569

    I hope this helps solve the issue. GREAT PLUGIN I USE IT ALL THE TIME!

    http://wordpress.org/extend/plugins/buddypress-pending-activations/

  2. skartar
    Member
    Posted 1 year ago #

    Hi there, I have the same errors - the plugin still works but errors show at the top of the admin page.

    Thanks for a really useful plugin.

  3. baldg0at
    Member
    Posted 1 year ago #

    I'm thinking the developer may not be supporting this plugin anymore. It hasn't been updated in over a year.

    Here's the fix. On line 18 of bp-pending-activations.php change this...

    $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(u.ID) FROM $wpdb->usermeta m1, $wpdb->users u WHERE u.ID = m1.user_id AND u.user_status = 2 AND m1.meta_key = 'activation_key' ORDER BY u.user_registered ASC" ) );

    to this ...

    $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(u.ID) FROM $wpdb->usermeta m1, $wpdb->users u WHERE u.ID = m1.user_id AND u.user_status = %d AND m1.meta_key = %s ORDER BY u.user_registered ASC", 2, 'activation_key' ) );

  4. bennygill
    Member
    Posted 1 year ago #

    GREAT!

    Thanks for this. I kept just activating and deactivating it all the time whene ever I needed it. But @baldg0at fix works great!

    I still get this error in the adminsection of the plugin though:

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/xxx/public_html/wp-content/plugins/buddypress-pending-activations/admin/bp-pending-activations-admin.php on line 6 and defined in /home/xxx/public_html/wp-includes/wp-db.php on line 990

    Any ideas on a fix for that?

  5. wrowlands
    Member
    Posted 1 year ago #

    I attempted to add this code, yet it broke our site. I reverted back to the original code and everything works fine. I am with you that the original author of this code is no longer involved and updated the plugin. the original plugin code works fine for our site.

    Thanks for your input. It would be great is someone were to take over this plugin or create a new one. For now, this plugin works for our site.

    Best,

    Wayne

  6. salvig67
    Member
    Posted 1 year ago #

    @baldg0at

    That Fix is Right on the Money!! I updated the code on Cyborgmusic.com and it is perfect thanks you are the Awesome!!! Big Time.

    You are my new best friend. Going to friend you and send you a contact info so we can keep in contact.

    You are a code guru bro!

    Thanks Sal

  7. salvig67
    Member
    Posted 1 year ago #

    @wrowlands

    You did something wrong Mr. wrowlands!!

    I updated my site and it is perfect!!

    Right on the money baldg0at!!

    Thanks Big Time!

  8. salvig67
    Member
    Posted 1 year ago #

    @baldg0at

    I build themes and sites.

    Not as much of a guru as you bro!

    But I know my way around code and would like to add you as a friend.

    look me up at https://salsclub.com Thanks and reference this bro thanks

  9. baldg0at
    Member
    Posted 1 year ago #

    You're right, @bennygill.

    Looks like this is the fix --

    on line 6 of /admin/bp-pending-activations-admin.php change this...

    return $wpdb->get_results( $wpdb->prepare( "SELECT u.*, m1.meta_value as activation_key FROM $wpdb->usermeta m1, $wpdb->users u WHERE u.ID = m1.user_id AND u.user_status = 2 AND m1.meta_key = 'activation_key' ORDER BY u.user_registered ASC" ) );

    to this...

    return $wpdb->get_results( $wpdb->prepare( "SELECT u.*, m1.meta_value as activation_key FROM $wpdb->usermeta m1, $wpdb->users u WHERE u.ID = m1.user_id AND u.user_status = %d AND m1.meta_key = %s ORDER BY u.user_registered ASC", 2, 'activation_key' ) );

  10. bennygill
    Member
    Posted 1 year ago #

    Great! worked again.

    THANKS :)

  11. bennygill
    Member
    Posted 1 year ago #

    hmmm...

    Now I get this error when I select a bunch of people and click resend activation key.

    Warning: Missing argument 2 for wpdb::prepare(), called in /home/thecashl/public_html/wp-content/plugins/buddypress-pending-activations/admin/bp-pending-activations-admin.php on line 63 and defined in /home/thecashl/public_html/wp-includes/wp-db.php on line 990

  12. baldg0at
    Member
    Posted 1 year ago #

    Eesh... I'll take a look.

    I may contact the developer and see if he'll let me take over ownership of the plugin.

  13. AK Ted
    Member
    Posted 1 year ago #

    For those who want to understand why the "Missing Argument" error appears, see this post from a core developer.

    In a nutshell, any plugin/theme developers who write code using $wpdb->prepare() but only pass one argument are "doing it wrong", as core developers like to say.

  14. baldgoat
    Member
    Plugin Author

    Posted 1 year ago #

    The developer let me take over development.

    I believe I have all the errors fixed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.