Table 'local.wp_mb_relationships' doesn't exist
Support › MB Relationships › Table 'local.wp_mb_relationships' doesn't existResolved
- This topic has 3 replies, 2 voices, and was last updated 1 hour, 44 minutes ago by
aryanraj.
-
AuthorPosts
-
January 26, 2026 at 11:19 PM #49675
aryanraj
ParticipantHi, Created a relationship between two post types, both uses custom table with prefix but i don't see wp_mb_relationships. it is not created after creating relationship and showing error.
WordPress database error: [Table 'local.wp_mb_relationships' doesn't exist] SELECT <code>from</code> FROM wp_mb_relationships WHERE <code>to</code>=1111 AND <code>type</code>='user_is_member' ORDER BY order_to WordPress database error: [Table 'local.wp_mb_relationships' doesn't exist] SELECT <code>from</code> FROM wp_mb_relationships WHERE <code>to</code>=1111 AND <code>type</code>='user_is_member' ORDER BY order_to WordPress database error: [Table 'local.wp_mb_relationships' doesn't exist] SELECT <code>from</code> FROM wp_mb_relationships WHERE <code>to</code>=1111 AND <code>type</code>='user_is_member' ORDER BY order_to WordPress database error: [Table 'local.wp_mb_relationships' doesn't exist] SELECT <code>from</code> FROM wp_mb_relationships WHERE <code>to</code>=1111 AND <code>type</code>='user_is_member' ORDER BY order_toThe selector shows but it saving the data because table is not present. I don't think i have deleted this table.
Using visual editor but code is this.<?php add_action( 'mb_relationships_init', 'your_prefix_register_relationships' ); function your_prefix_register_relationships() { MB_Relationships_API::register( [ 'id' => 'user_is_member', 'from' => [ 'post_type' => 'person', 'object_type' => 'post', 'field' => [ 'add_new' => false, ], ], 'to' => [ 'post_type' => 'member', ], 'reciprocal' => false, 'delete_data' => false, ] ); }January 27, 2026 at 5:18 PM #49677aryanraj
Participanti don't see it is creating this table wp_mb_relationships. how to fix it?
January 27, 2026 at 9:42 PM #49678Peter
ModeratorHello,
Thanks for reaching out.
It looks like the table wp_mb_relationships was created and deleted, then Meta Box marked it as created by creating the option
mbr_table_createdand set value to 1. Please access the database, table wp_options and delete the optionmbr_table_createdto fix the issue.Let me know how it goes.
January 27, 2026 at 9:45 PM #49679aryanraj
Participantoh, i don't remember deleting this table but the fix worked. mark this as solved.
-
AuthorPosts
- You must be logged in to reply to this topic.