{"id":18860932,"date":"2026-03-24T10:40:20","date_gmt":"2026-03-24T10:40:20","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/weird-checkbox-behaviour-on-wp-7\/"},"modified":"2026-03-24T10:40:20","modified_gmt":"2026-03-24T10:40:20","slug":"weird-checkbox-behaviour-on-wp-7","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/weird-checkbox-behaviour-on-wp-7\/","title":{"rendered":"Weird checkbox behaviour on WP 7"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"CMB2 Checkbox Bug WP 7\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/w-JWX1eudGE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n\n\n<p class=\"wp-block-paragraph\">Hey, I hope this is the right place to report this but I am suspecting that the backend UI change broke something about CMB2 checkboxes. We are using CMB2 as a composer package in our plugin and the checkboxes behave weirdly in the newest RC of WordPress 7.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I also tested it on bare CMB2 and made a little video to illustrate the issue. Here are the steps to reproduce the issue:<br \/><br \/>1. Start WP instance on 7.0 Beta 6<br \/>2. Install CMB2 plugin<br \/>3. Add following code snippet:<br \/><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'cmb2_admin_init', 'cmb2_sample_metaboxes' );<br \/>\/**<br \/> * Define the metabox and field configurations.<br \/> *\/<br \/>function cmb2_sample_metaboxes() {<br \/><br \/>\t\/**<br \/>\t * Initiate the metabox<br \/>\t *\/<br \/>\t$cmb = new_cmb2_box( array(<br \/>\t\t'id'            =&gt; 'test_metabox',<br \/>\t\t'title'         =&gt; __( 'Test Metabox', 'cmb2' ),<br \/>\t\t'object_types'  =&gt; array( 'page', ), \/\/ Post type<br \/>\t\t'context'       =&gt; 'normal',<br \/>\t\t'priority'      =&gt; 'high',<br \/>\t\t'show_names'    =&gt; true, \/\/ Show field names on the left<br \/>\t\t\/\/ 'cmb_styles' =&gt; false, \/\/ false to disable the CMB stylesheet<br \/>\t\t\/\/ 'closed'     =&gt; true, \/\/ Keep the metabox closed by default<br \/>\t) );<br \/><br \/>\t\/\/ Regular text field<br \/>\t$cmb-&gt;add_field( array(<br \/>\t\t'name'       =&gt; __( 'Test Checkbox', 'cmb2' ),<br \/>\t\t'desc'       =&gt; __( 'field description (optional)', 'cmb2' ),<br \/>\t\t'id'         =&gt; 'test_checkone',<br \/>\t\t'type'       =&gt; 'checkbox',<br \/>\t) );<br \/><br \/>\t\/\/ Regular text field<br \/>\t$cmb-&gt;add_field( array(<br \/>\t\t'name'       =&gt; __( 'Test Checkbox two', 'cmb2' ),<br \/>\t\t'desc'       =&gt; __( 'field description (optional)', 'cmb2' ),<br \/>\t\t'id'         =&gt; 'test_checktwo',<br \/>\t\t'type'       =&gt; 'checkbox',<br \/>\t) );<br \/><br \/>\t\/\/ Add other metaboxes as needed<br \/><br \/>}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4. Edit page and observe weird behaviour in metabox as shown in the video.<br \/><br \/>Thank you!<\/p>\n","protected":false},"template":"","class_list":["post-18860932","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18860932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18860932\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18860932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}