Sorting group field elements gets the fields values messed up
-
Hi!
I have had this weird problem recently.
I have got a group field defined. Something like that:$service_products_repeatable = $service_metaboxes->add_field( [ 'id' => $pref . 'services_products', 'type' => 'group', 'name' => 'Products list', 'options' => [ 'add_button' => 'Add product', 'remove_button' => 'Remove product', 'sortable' => true, ], ] ); $service_metaboxes->add_group_field( $service_products_repeatable, [ 'id' => 'product_name', 'name' => 'Product name', 'type' => 'text', ] ); $service_metaboxes->add_group_field( $service_products_repeatable, [ 'id' => 'product_description', 'name' => 'Product description', 'type' => 'wysiwyg', 'options' => [ 'media_buttons' => false, 'textarea_rows' => 10, 'teeny' => true, ], ] );
The problem is that when I change the fields order in the wp-admin UI, the values of the wysiwyg fields gets mixed up. They get mixed up during sorting, I do not have to update the post for the effect to take place.
By “mixing up” I mean that some values from one field get assigned to another, sometimes the values disappear etc. When that happens, the affected wysiwyg fields gets broken – it looses its UI (text formatting buttons etc) and becomes unresponsive.
Has anyone ever experienced this weird behaviour? Is it a known bug?
I am using the latest version of CMB2 and WordPress.Thanks in advance for any help ??
- The topic ‘Sorting group field elements gets the fields values messed up’ is closed to new replies.