Support Forum
Support › MB Relationships › Issue with Meta Box Relationships
Hello Meta Box Team,
I'm encountering a problem related to the relationships feature of the Meta Box plugin on my site. Despite configuring the relationships correctly, they're not displaying as expected on both the admin side and the front end.
Issue:
The relationships fields have content, but they aren't visible in the Admin Column or on the website's frontend. The relationships are set up correctly and have been for a long time. This issue just happend with one of the recent updates but cannot pinpoint which one.
I even tried to reinstall a full backup and the issue persists.
Error Details (from Query Monitor):
Plugin: meta-box-aio
Error Message: Unknown column 'mbr_reviews-services_to' in 'group statement'
Error Code: 1054
Environment Details:
WordPress Version: 6.3.1
Active Theme: Bricks Builder
PHP Version: 8.0.30
Any help or guidance on resolving this issue would be highly appreciated.
Thank you,
Hello Meta Box Team,
I have the same environment as the above post and I'm experiencing the same issue.
Bricks Builder support is saying that it may have to do with Object Cache, but I disabled it and Relationships are still not displaying.
Appreciate any help you can provide here!
Hello,
If the relationship is saved properly, please try to deactivate all plugins except Meta Box, MB extension plugins, switch to a standard theme of WordPress and recheck the connection in the admin column and frontend.
There's a conflict with Object Cache Pro. I disabled it and now relationships are being displayed. Is this a known conflict?
Hello,
Maybe it's a conflicting issue. This is a premium plugin and we have not tested it before. You can also contact Object Cache Pro support and ask for more information. Just one note: the relationship data is saved in a custom table wp_mb_relationships.
I can also confirm a conflict with Object Cache Pro.
Disabling it fixed issues.
Error message, if helpful:
WordPress database error: [Unknown column 'mbr_order' in 'order clause']
SELECT wp_dgs8sn_posts.ID FROM wp_dgs8sn_posts INNER JOIN wp_dgs8sn_mb_relationships AS mbr ON (mbr.type = 'course-products-to-instructors-woo' AND ((mbr.from = wp_dgs8sn_posts.ID AND mbr.to IN (2807)) OR (mbr.to = wp_dgs8sn_posts.ID AND mbr.from IN (2807)))) WHERE 1=1 AND ((wp_dgs8sn_posts.post_type = 'product' AND (wp_dgs8sn_posts.post_status = 'publish' OR wp_dgs8sn_posts.post_status = 'private'))) GROUP BY mbr_from, mbr_to, wp_dgs8sn_posts.ID ORDER BY mbr_order
ASC, mbr_id DESC
Notes:
I've tried editing the WP_REDIS_CONFIG to add the MB Relationships groups to the non-persistent groups, and also to the non-prefetchable groups. Neither made a difference.
https://objectcache.pro/docs/configuration-options/#non-persistent-groups
I'm not well-versed with editing Object Cache Pro config, so used the Query Monitor plug into verify these changes were loading properly.
I used the groups found in /wp-admin > Settings > Object Cache > Tools > Groups
-- It's possible I haven't targeted the correct group, I suppose, although I targeted all groups that are seemingly related to the issue.
I am also having this exact issue. I am running a multisite thru Cloudways, and we don't have access to the OCP settings at all since it's a drop-in. They disabled it and my MB Relationship data was on the front end, but not having OCP is not really a solution. Is there anyone who has a fix for this? Is this something that will be patched in a subsequent update from Metabox? Bricks? OCP? I'm not even sure who to submit this to, so I intend to post on the Bricks forum as well, at least
Has there been an update to this? Meta Box's latest update claims to have fixed this, but I am still facing an issue of non-persistent MB relationships. It disappears upon any page reload. Using Bricks + Meta Box AIO.
I am also experiencing this, but I have no cache and no plug-ins except for MetaBox.
I have two custom post typed: Products and Answers. Each product can have many Answers and each Answer can apply to many Products.
I have created a reciprocal relationship From Answers to Products, and then another reciprocal relationship from Products to Answers. From each post type, I see the meta-box for the related post type and when I type, I see related values. When I select related post types and save the post, they remain selected.
However, when I look a the related post, the reciprocal values do not appear. This is failing in both directions. I also noticed that the wp_mb_relationship table has been created but contains no data.
Do I have to use the MB Custom Table extension for this to work, or might it work better if I did?
I have read all of the related posts/threads and I have tried every option, but I cannot get this to work.
I bought Metabox because it seemed quite thorougly developed. But the relationship module is really not properly designed in my opinion. I can set everything up and I can choose even m-n relationships. But accessing and displaying it, is a nightmare.
Especially when I want to use the relationship field as a rich snippet field, it's impossible as the relationship field is somehow only "virtually" available. I can't match the relationship field to a schema field because the relationship is just not available.
Has anyone gotten this to work with a many-to-many relationship between custom post types in the Admin UI? For example, where Products is a custom post type with a recipricol relationship to FAQs, which is another custom post type and when an FAQ is related to a Product (using a product_faq custom field), the Product shows up in the faq_product custom feed of the related FAQ? And the related Product is removed from the FAQ when the FAQ is removed from the Product?
As it stands now, I can add an FAQ to a Product and I can add a Product to an FAQ, but they never show up in the reciprocal post_type.
I also noticed that no records ever show up in the mb_relationships table. According to the documentation, this is the table used to store the relationships.
Is there a way to get support from MetaBox for a $149 paid license? So far, all I can see is the forum and custom development? I'm wanting support for an advertised feature.
Hello Stephen,
You should use the "Reciprocal" option when creating a relationship between one post type, for example: post-to-post, page-to-page. It will prevent two relationship meta boxes when editing a post.
using a product_faq custom field
: it looks like you are using a post custom field. The relationship has a separate meta box with a select field when editing the post (Product or FAQ). If it does not work as expected, can you please share some screenshots of the relationship on your site?
Read more in the documentation https://docs.metabox.io/extensions/mb-relationships/#using-meta-box-builder
I never saw the relationship MetaBox, so I created the custom fields as a relationship field to the other Post Type. I'll try again and look out for it.