Skip to:
Content
Pages
Categories
Search
Top
Bottom

Self-inflicted BP Tables Madness


  • warezit
    Participant

    @warezit

    Hello!

    I am having an issue with BP, that I caused myself. I intentionally deactivated, then deleted, BP (on a 5 day old site) thinking that I wasn’t going to use it. Then I ran ‘WP Optimize’ which removed all the unused tables from the plugins I had installed, and removed unused transients, etc… This is what caused the problem.

    Some time later, I went to re-install BP – which succeeds with no issues. Here’s where the issues crop up… Next, I went to create a new Group on the BP front-end, and it reports an error:
    There was an error saving group details. Please try again.

    Enabling WP debug mode in “wp-config.php” reports this:

    WordPress database error: [Table 'wordpress.wp_bp_groups' doesn't exist]
    SELECT id FROM wp_bp_groups WHERE slug = 'create'
    WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist]
    SELECT id, user_id, date_recorded FROM wp_bp_activity WHERE component = 'members' AND type = 'last_activity' AND user_id IN (1) LIMIT 1
    WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist]
    SELECT id, user_id, date_recorded FROM wp_bp_activity WHERE component = 'members' AND type = 'last_activity' AND user_id IN (1) LIMIT 1
    WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist]
    SHOW FULL COLUMNS FROM <code>wp_bp_activity</code>
    WordPress database error: [Table 'wordpress.wp_bp_notifications' doesn't exist]
    SELECT * FROM wp_bp_notifications n WHERE user_id IN (1) AND component_name IN ('friends','messages','activity','groups','blogs') AND is_new = 1
    WordPress database error: [Table 'wordpress.wp_bp_messages_recipients' doesn't exist]
    SELECT SUM(unread_count) FROM wp_bp_messages_recipients WHERE user_id = 1 AND is_deleted = 0 AND sender_only = 0
    WordPress database error: [Table 'wordpress.wp_bp_friends' doesn't exist]
    SELECT id FROM wp_bp_friends WHERE (initiator_user_id = 1 OR friend_user_id = 1) ORDER BY date_created DESC
    WordPress database error: [Table 'wordpress.wp_bp_groups_members' doesn't exist]
    SELECT COUNT(DISTINCT m.group_id) FROM wp_bp_groups_members m, wp_bp_groups g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = 1
    WordPress database error: [Table 'wordpress.wp_bp_messages_notices' doesn't exist]
    SELECT id FROM wp_bp_messages_notices WHERE is_active = 1

    I have been trying to find a solution for this online, for the last 4+ hours… and I have gotten nowhere… So, I am humbly asking for help here, on how to recreate these tables – WITHOUT DELETING AND RECREATING MY ENTIRE SITE. I have nearly 100 hours into this site so far, and I am NOT starting over. Starting over is NOT an option, so please save everyone’s time and skip suggesting this.

    I have reviewed all of these links, and followed all of their respective directions, when applicable:

    Deleting BuddyPress


    https://buddypress.org/support/topic/reinstall-should-i-delete-old-tables-from-db/

    repair buddypress database


    and, many many many many more links, that I am not going to go back and try to find…

    Any help with this would be great – I’d really like to use BP again… I have seen a number of other people online with this issue, so I know I am not the only one. There has to be some elegant solution to re-create the required SQL tables for the plugin, right?

    I have tried running this, after I reinstalled BP the 4th time (with my TDL inserted, ofc):
    https://xxxxxx.com/wp-content/plugins/buddypress/bp-core/bp-core-update.php?f=bp_update_to_2_7_4
    But, it didn’t seem to do anything…

    Ubuntu 16.04.1
    Apache 2.4.18
    PHP 7.0.13
    WP 4.7.2
    BP 2.7.4
    no other BP extension/plugins have been installed since the 1st time removing BP

    I am more than happy to provide any requested log files!

    Thank you a TON in advance!! I look forward to getting this working again.

Viewing 9 replies - 1 through 9 (of 9 total)

  • warezit
    Participant

    @warezit

    Follow up side note: “WP Optimize” plugin removed all the tables starting with wp_bp_ and then I personally removed all the options from the “wp_options” table starting with bp-

    Then I tried reinstalling BP. Still not able to make a new group, due to missing tables. It is at this point, where I decided to write the OP from this thread.

    Hopefully that helps diagnose this…


    warezit
    Participant

    @warezit

    Anyone able to point me in the right direction, or suggest a paid plugin that is better?

    I’m willing to spend money if it means I actually get support.


    r-a-y
    Keymaster

    @r-a-y

    Not sure what your issue is, but after going through the removal steps, did you deactivate BuddyPress and reactivate it?

    If you have an object cache plugin active, you should purge your entire cache after removing the DB options so BP can reinstall its tables properly when you reactivate BuddyPress.


    warezit
    Participant

    @warezit

    Hi r-a-y,

    Thank you for your response!

    I decided to take some time away from it to get a fresh look. I’m in the middle of diagnosing this more accurately right now, and I’ll do my best to report my findings back here hopefully soon.

    Thank you again for your follow up.

    edit: I should also mention, no caching plugins are enabled


    warezit
    Participant

    @warezit

    To follow up…

    I dug through the forums here a bit more, and re-checked my work (removing tables and keys from the database). I did not remove all settings from the database.

    After disabling and removing the BuddyPress plugin, then backing up my database… I loaded up phpmyadmin > wp_options table > search for bp_ and bbp_ (I know “bbp_” if for bbPress, I just wanted a clean reset) and then removed all those settings from the database. Re-installed a fresh download of BuddyPress, and we’re all set. BuddyPress has been reset to “out-of-the-box” settings, and I am able to create groups again! Woohoo!

    Hopefully this helps someone else! Thank you again for reaching out r-a-y. I am happy I didn’t have to bug anyone tremendously to get this resolved. 🙂

    Cheers!


    lifeflowdan
    Participant

    @lifeflowdan

    thanks for posting this. It helped someone out 15 months after you did (who has two thumbs and is pointing at himself? this guy)


    marbaque
    Participant

    @marbaque

    Hi @warezit thank you for sharing this. I happen to have the same exact problem. I used WPOptimize plugin to delete unused tables in my database. I may have deleted the tables dedicated to store Buddypress messages. Users can’t send private messages and admins can’t send site-wise notices.

    I wanted to confirm the steps to did to solve this. First you deleted the plugin, then backup database, then search and delete bp_ in wp_options table.

    Last, you re-installed plugin.

    Did you lose any data in the process. I have working site with many users.


    Bryan Sayler
    Participant

    @bryansayler

    @marbaque I’m missing the 3 BuddyPress Messages tables from my database as well due to WP Optimize. Did you have any luck getting these tables reinstalled?


    marbaque
    Participant

    @marbaque

    So, I can´t remember exactly how, also an IT workmate helped me solved it. Basically, we compared the database with a backup to find the missing tables. Then he created these manually. There is a database diagram here in case you are not sure about how to create these https://codex.buddypress.org/developer/buddypress-database-diagram/.

    The thing is you need some mysql knowledge for that. I hope this helps.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar