Forum Replies Created
-
AuthorPosts
-
Kara
ParticipantI think I'm having the same issue.
If it matters, I created the CPT and Custom Fields using Metabox AIO. It built it out on Website A, where everything is working perfectly. I used the Meta Box export/import tool to move it to Website B.
On Website B, all of the fields are visible at first. But after filling them in and saving, the content is removed.
Interestingly, I have a webhook set up to auto-post from Website A to Website B and this actually works, initially. At first, the post displays properly on the front end. But, the post still breaks if you re-save (even if no edits were made.)
See this video from a staging site for Website B:
https://www.awesomescreenshot.com/video/24124078?key=558537a2a6e1378a46f36e2107dccf81- Default theme
- Only activated plugins: Meta Box and Meta Box AIO
- Review CPT: Podcast
- Review Custom Fields: Podcast
- View Podcast post created by webhook - all fields properly filled in and saved
- Resave post without making any edits and refresh the page
- Result: Content is removed, custom fields are removedThe same is true if I create the post from scratch on this site.
If I add content to the fields and hit save, it *appears* to do so. But when refreshed, the same result occurs: content is removed, custom fields are removed.Kara
ParticipantNotes:
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.Kara
ParticipantI 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 BYmbr_orderASC, mbr_id DESCKara
ParticipantAh yes - I am using Object Cache Pro.
There were no issues up to now, as far as I know.We can close this and I'll follow along on the other thread.
Thank you.
Kara
ParticipantNote: Using Meta Box AIO version 1.23.0 (throwing errors)
The previous working version was 1.22.0
Kara
ParticipantAny news on this? ๐
Kara
ParticipantQuick context - I'm using the ElasticPress plugin - it shows the taxonomies I built with Meta Box but not the custom fields, which I very much need it to recognize.
Thank you ๐
Kara
ParticipantAny updates to this?
Kara
ParticipantOh, and using MetaBox Builder / AIO if that matters.
Kara
ParticipantStill not working...
Kara
ParticipantThank you - looking forward to the fix ๐
Kara
ParticipantOkay - I just recreated and tested step by step.
I believe the problem is this: The taxonomies (Training and Community) also use conditional logic. They only show when a button is previously selected.
Without this conditional logic, the 2 rules to show the custom fields group work.
When the conditional logic (with the buttons to show the taxonomies), it does not work.Is it possible to fix this?
This site will have a pretty big library of resources and the conditional logic makes the data entry for my client much easier to keep it organized.I used the same field group ("Seminars/Webinars & Roundtables") as I originally posted.
Here is the test group I created with the buttons and taxonomies:<div> <?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Tax test', 'your-text-domain' ), 'id' => 'tax-test', 'post_types' => ['member-content'], 'fields' => [ [ 'name' => __( 'Which bucket does this go into?', 'your-text-domain' ), 'id' => $prefix . 'category_type', 'type' => 'button_group', 'options' => [ 'Resource' => __( 'Resource', 'your-text-domain' ), 'Training' => __( 'Training', 'your-text-domain' ), 'Community' => __( 'Community', 'your-text-domain' ), ], 'required' => true, ], [ 'name' => __( 'Community', 'your-text-domain' ), 'id' => $prefix . 'comm_tax', 'type' => 'taxonomy', 'taxonomy' => ['community'], 'field_type' => 'select_advanced', 'visible' => [ 'when' => [['category_type', '=', 'Community']], 'relation' => 'or', ], ], [ 'name' => __( 'Resource', 'your-text-domain' ), 'id' => $prefix . 'resource_tax', 'type' => 'taxonomy', 'taxonomy' => ['resource'], 'field_type' => 'select_advanced', 'visible' => [ 'when' => [['category_type', '=', 'Resource']], 'relation' => 'and', ], ], [ 'name' => __( 'Training', 'your-text-domain' ), 'id' => $prefix . 'training_tax', 'type' => 'taxonomy', 'taxonomy' => ['training'], 'field_type' => 'select_advanced', 'visible' => [ 'when' => [['category_type', '=', 'Training']], 'relation' => 'or', ], ], ], ]; return $meta_boxes; } </div>Kara
ParticipantThanks for getting back to me, Peter.
Is it possible to request this feature is added to the roadmap?
We have a *lot* of options for taxonomies and the select_tree option is the best for user experience here. We need to be able to choose a single parent, and a single child taxonomy option (from the selected parent) for each post.
The conditional logic then calls up the custom fields related to that child taxonomy.
I understand the checkbox_tree could technically work here, but the goal is to make this as user-friendly as possible for my client, as well. The select_tree puts in the guard rails needed to maintain the integrity of the sitemap.
I'm very open to other solutions - this turned into an unexpected roadblock.
Kara
ParticipantThanks so much for that, Peter!
That works, except I need it the other way around.I think the way you wrote it excludes the view from showing up on those posts
But, I need to exclude post ids [895, 890, 882] from showing up on post id [692].
Can you help me with this?
Thank you!Kara
ParticipantHi Peter -
Ah, I think I see what you're saying now. But, I don't know much PHP so no, I haven't tried to create the if statement you mentioned. Is this something you could you help me out with it?
If so,
The speaker page is id=692
I want to exclude these speaker topics from the view: 895, 890, 882And then, do I add this to the View code I shared above or somewhere else?
Thank you ๐
-
AuthorPosts