Error on Image Advanced + MB Group

Support MB Group Error on Image Advanced + MB Group

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #47023
    HamRongMediaHamRongMedia
    Participant

    Using:
    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/5UpqQON3u6Bn

    I 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>
    #47027
    PeterPeter
    Moderator

    Hello,

    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/49B1vCE

    You can try to deactivate all plugins except Meta Box, MB Group, switch to a WordPress theme and check the issue again.

    #47035
    HamRongMediaHamRongMedia
    Participant

    I found Problem. It is not compatible with this plugin.
    Image Optimizer - Compress, Resize and Optimize Images - By Elementor.com
    https://prnt.sc/klToOJB5R-D-

    #47046
    PeterPeter
    Moderator

    Hello,

    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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.