field type taxonomy advanced - not populating data in the metabox
- This topic has 7 replies, 2 voices, and was last updated 2 years, 3 months ago by
Prabakaran Shankar.
-
AuthorPosts
-
December 20, 2022 at 4:50 PM #39934
Prabakaran Shankar
ParticipantHello,
Im using field type taxonomy advanced. It is storing the data properly, but not populating the content after refresh.
https://loom.com/share/e3cfaed63cc949c58ba35ee2463efd62code use to generate metabox
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Custom Query Parameters', 'your-text-domain' ), 'id' => 'custom-query-block', 'post_types' => ['page'], 'storage_type' => 'custom_table', 'table' => 'custom', 'fields' => [ [ 'name' => __( 'Query Parameters', 'your-text-domain' ), 'id' => $prefix . 'nvs_query_parameters', 'type' => 'group', 'fields' => [ [ 'name' => __( 'Custom Query', 'your-text-domain' ), 'id' => $prefix . 'custom_query', 'type' => 'radio', 'options' => [ 'yes' => __( 'Category Page', 'your-text-domain' ), 'no' => __( 'Not a Category Page', 'your-text-domain' ), ], 'required' => true, ], [ 'name' => __( 'Post type', 'your-text-domain' ), 'id' => $prefix . 'post_type', 'type' => 'select_advanced', 'options' => [ 'post' => __( 'Post', 'your-text-domain' ), 'page' => __( 'Page', 'your-text-domain' ), 'job' => __( 'Job', 'your-text-domain' ), 'emp' => __( 'Employer', 'your-text-domain' ), 'scholar' => __( 'Scholarships', 'your-text-domain' ), ], 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Current Status', 'your-text-domain' ), 'id' => $prefix . 'current_status', 'type' => 'taxonomy_advanced', 'taxonomy' => ['current-status'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Country', 'your-text-domain' ), 'id' => $prefix . 'country', 'type' => 'taxonomy_advanced', 'taxonomy' => ['country'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Position', 'your-text-domain' ), 'id' => $prefix . 'position', 'type' => 'taxonomy_advanced', 'taxonomy' => ['position'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Subjects', 'your-text-domain' ), 'id' => $prefix . 'subjects', 'type' => 'taxonomy_advanced', 'taxonomy' => ['post_tag'], 'field_type' => 'select_advanced', 'multiple' => true, 'query_args' => [ 'number' => 50, ], 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Workplace', 'your-text-domain' ), 'id' => $prefix . 'workplace', 'type' => 'taxonomy_advanced', 'taxonomy' => ['workplace'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Country 2', 'your-text-domain' ), 'id' => $prefix . '2cou', 'type' => 'taxonomy_advanced', 'taxonomy' => ['country'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Position 2', 'your-text-domain' ), 'id' => $prefix . '2pos', 'type' => 'taxonomy_advanced', 'taxonomy' => ['position'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Subjects 2', 'your-text-domain' ), 'id' => $prefix . '2sub', 'type' => 'taxonomy_advanced', 'taxonomy' => ['post_tag'], 'field_type' => 'select_advanced', 'multiple' => true, 'query_args' => [ 'number' => 50, ], 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( ' Workplace 2', 'your-text-domain' ), 'id' => $prefix . '2wor', 'type' => 'taxonomy_advanced', 'taxonomy' => ['workplace'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Status Type', 'your-text-domain' ), 'id' => $prefix . 'status_type', 'type' => 'taxonomy_advanced', 'taxonomy' => ['status-type'], 'field_type' => 'select_advanced', 'multiple' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Posts per page', 'your-text-domain' ), 'id' => $prefix . 'posts_per_page', 'type' => 'number', 'columns' => 4, ], [ 'name' => __( 'Custom ID', 'your-text-domain' ), 'id' => $prefix . 'custom_id', 'type' => 'text', 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Filters Option', 'your-text-domain' ), 'id' => $prefix . 'filters_option', 'type' => 'switch', 'on_label' => 'ON', 'off_label' => 'OFF', 'std' => true, 'columns' => 4, 'visible' => [ 'when' => [['custom_query', '=', 'yes']], 'relation' => 'or', ], ], [ 'name' => __( 'Filter Choices', 'your-text-domain' ), 'id' => $prefix . 'filter_choices', 'type' => 'checkbox_list', 'options' => [ 2 => __( 'Positions', 'your-text-domain' ), 3 => __( 'Countries', 'your-text-domain' ), 23 => __( 'Workplace', 'your-text-domain' ), 16 => __( 'Subjects', 'your-text-domain' ), 18 => __( 'Info Types', 'your-text-domain' ), 20 => __( 'Qualifications', 'your-text-domain' ), 12 => __( 'Pagination', 'your-text-domain' ), ], 'columns' => 4, ], [ 'name' => __( 'Display Block Settings', 'your-text-domain' ), 'id' => $prefix . 'dbsg', 'type' => 'checkbox', 'label_description' => __( 'elements to not display in each block', 'your-text-domain' ), 'columns' => 4, ], ], ], ], ]; return $meta_boxes; }
December 20, 2022 at 10:26 PM #39943Peter
ModeratorHello,
Can you please test to create a new field group with the same taxonomy advanced fields and save data to a new custom table to see if it works? I've experienced with the same issue before but it works when I create a new field group and custom table.
December 21, 2022 at 3:51 AM #39950Prabakaran Shankar
ParticipantHello Peter,
Thanks for the information and the idea. Based on that, I've checked with a new custom table and group field with taxonomy advanced and individual taxonomy advanced.
<?php add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Job Meta - Logo', 'your-text-domain' ), 'id' => 'job-meta-logo', 'post_types' => ['page'], 'storage_type' => 'custom_table', 'table' => 'custom_table', 'fields' => [ [ 'name' => __( 'Group', 'your-text-domain' ), 'id' => $prefix . 'page_qryparams', 'type' => 'group', 'fields' => [ [ 'name' => __( 'Countries list', 'your-text-domain' ), 'id' => $prefix . 'couq1_dadsaf', 'type' => 'taxonomy_advanced', 'taxonomy' => ['country'], 'field_type' => 'select_advanced', 'multiple' => true, ], [ 'name' => __( 'Taxonomy', 'your-text-domain' ), 'id' => $prefix . 'taxonomy_b6txshpk8ct', 'type' => 'taxonomy', 'field_type' => 'select_advanced', ], ], ], [ 'name' => __( 'Taxonomy Advanced', 'your-text-domain' ), 'id' => $prefix . 'tx_123', 'type' => 'taxonomy_advanced', 'taxonomy' => ['country'], 'field_type' => 'select_advanced', ], ], ]; return $meta_boxes; }
check out the image for output.
For both input, data stored in the custom table without any problem. The results are not positive for taxonomy advanced inside the group field. However, the individual taxonomy advanced field populate the content.December 21, 2022 at 10:09 PM #39961Peter
ModeratorHello,
Thanks for your feedback.
I can reproduce the issue on my demo site and I've escalated this issue to the development team to fix it in the next update.
December 22, 2022 at 12:53 AM #39967Prabakaran Shankar
ParticipantThanks.
December 22, 2022 at 5:39 PM #39989Prabakaran Shankar
ParticipantHello, is there a chance for a fast repair, patch, or file?
December 22, 2022 at 9:05 PM #39990Peter
ModeratorHello,
Yes, please check the fix here https://github.com/wpmetabox/meta-box/commit/d18fe9a84d29fab1b66a5454b19b05c8c7cc380d
December 22, 2022 at 9:55 PM #39994Prabakaran Shankar
ParticipantThank you for providing an update. It's effective...
-
AuthorPosts
- You must be logged in to reply to this topic.