Error on Image Advanced + MB Group
- This topic has 3 replies, 2 voices, and was last updated 5 months, 1 week ago by
Peter.
-
AuthorPosts
-
November 26, 2024 at 8:00 AM #47023
HamRongMedia
ParticipantUsing:
Meta Box - 5.10.4
MB Group – 1.4.4 – Nov 19, 2024– MB Group with clone=true when save will auto create empty item at first array.
https://prnt.sc/xpzW508AyTYX– Image Advanced / Image field not display after save when have value
https://prnt.sc/5UpqQON3u6BnI Downgrade Meta Box to v5.5.1, Image field display value again, but empty item at first array still happen.
Sample Code:
<div>add_filter( 'rwmb_meta_boxes', 'hrm_register_meta_boxes' ); function hrm_register_meta_boxes( $meta_boxes ){ $meta_boxes[] = array( 'title' => __( 'Page Setting Content', 'hrm' ), 'pages' => array( 'page' ), 'id' => 'Home-Page-Setting-Content', 'show' => array('template' => array( 'template-home.php' )), 'fields' => array( [ 'type' => 'heading', 'name' => 'Home Slide', ], [ 'id' => 'home_slide', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'default_state' => 'collapsed', 'group_title' => '#{#}: {title}', 'fields' => [ [ 'name' => 'Title', 'id' => 'title', 'type' => 'text', ], [ 'name' => 'Description', 'id' => 'desc', 'type' => 'textarea', ], [ 'name' => 'Button Text', 'id' => 'button_text', 'type' => 'text', ], [ 'name' => 'Button Url', 'id' => 'button_link', 'type' => 'textarea', ], [ 'id' => 'bg_desk', 'name' => 'Background Desktop', 'type' => 'image_advanced', 'max_file_uploads' => 1, ], [ 'id' => 'bg_mobi', 'name' => 'Background Mobile', 'type' => 'image_advanced', 'max_file_uploads' => 1, ], ], ], ), ); return $meta_boxes; } </div>
November 26, 2024 at 11:07 PM #47027Peter
ModeratorHello,
I use the code above to create a
group
field and subfields on my local site, add a page and save with some sample value but don't see that issue. Please check these screenshots https://imgur.com/a/49B1vCEYou can try to deactivate all plugins except Meta Box, MB Group, switch to a WordPress theme and check the issue again.
November 27, 2024 at 11:23 AM #47035HamRongMedia
ParticipantI found Problem. It is not compatible with this plugin.
Image Optimizer - Compress, Resize and Optimize Images - By Elementor.com
https://prnt.sc/klToOJB5R-D-November 27, 2024 at 10:53 PM #47046Peter
ModeratorHello,
Then you can deactivate the Image Optimizer plugin when using the cloneable group on the editing page. I will forward this topic to the development team to check the compatibility between Meta Box and Image Optimizer.
-
AuthorPosts
- You must be logged in to reply to this topic.