clone_empty_start bug?

Support General clone_empty_start bug?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46718
    Jean-Michel JunodJean-Michel Junod
    Participant

    Hello,
    Since version 5.10 and still existing in 5.10.2, I have problems with clonable group containing a select field.
    Not sure if it's related to the new clone_empty_start feature, but everytime I edit my block, a new empty block is automatically added at first position, I can't delete it.
    If the group does not contains a select, or if changed to select_advanced, it works correctly...

    Minimal code to reproduce:

    $meta_boxes[] = [
    	'title'           => 'CTA Info',
    	'id'              => 'cta-info',
    	'type'            => 'block',
    	'context'         => 'side',
    	'render_template' => get_stylesheet_directory() . '/blocks/campagnes-new/cta-info/template.php',
    	'fields'          => [
    		[
    			'id'   => 'ctas',
    			'name' => 'CTA',
    			'type' => 'group',
    			'clone' => true,
    			'sort_clone' => true,
    			'clone_empty_start' => false,  // true has same effect
    			'fields'      => [
    				[
    					'type' => 'select',
    					'id'   => 'type_cta',
    					'name' => 'Type',
    					'options' => [
    						'phone'  	  => 'Phone',
    						'email' 	  => 'Email',
    					],
    				],
    				[
    					'type' => 'text',
    					'id'   => 'title',
    					'name' => 'Title',
    				]
    			],
    		],
    	],
    ];
    #46719
    Jean-Michel JunodJean-Michel Junod
    Participant

    Apparently same problem with group having a image_advanced field

    #46731
    PeterPeter
    Moderator

    Hello Jean,

    Can you please share some screenshots or a screen record of the clone empty start issue on your site? I see it works properly when enabling option clone_empty_start.

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