Color picker issue
-
It seems there’s an issue with color picker: span containing the background color covers covers all the meta box area. See screenshot: http://tinypic.com/view.php?pic=10da15h&s=9#.WhUqQbT83xs
-
Can you provide your CMB2 config for that metabox, and we can see if we can reproduce on our own.
Here it is! It worked fine before WP4.9
add_action( 'cmb2_admin_init', 'yup_register_hero_settings_metabox' ); function yup_register_hero_settings_metabox() { $prefix = 'yup_hero_'; $cmb_hero = new_cmb2_box( array( 'id' => $prefix . 'metabox', 'title' => esc_html__( 'Hero Settings', 'yup' ), 'object_types' => array( 'page', 'room', 'event', 'food', 'deal' ), 'context' => 'side', 'priority' => 'core', 'show_names' => false, ) ); $cmb_hero->add_field( array( 'name' => esc_html__( 'Fade color', 'yup' ), 'desc' => esc_html__( 'Fade background image with an overlay color', 'yup' ), 'id' => $prefix . 'color', 'type' => 'rgba_colorpicker', 'default' => 'rgba(53,63,73,0)', ) ); $cmb_hero->add_field( array( 'name' => esc_html__( 'Titles alignment', 'yup' ), 'desc' => esc_html__( 'Align the title and the subtitle to left or center', 'yup' ), 'id' => $prefix . 'align', 'type' => 'radio', 'default' => 'is-centered', 'options' => array( 'is-left' => esc_html__( 'Align left', 'yup' ), 'is-centered' => esc_html__( 'Align center', 'yup' ), ), ) ); $cmb_hero->add_field( array( 'name' => esc_html__( 'Hero Height', 'yup' ), 'desc' => esc_html__( 'The minimum height of the hero', 'yup' ), 'id' => $prefix . 'height', 'type' => 'select', 'options' => array( 'is-contentheight' => esc_html__( 'Content Height', 'yup' ), 'is-halfheight' => esc_html__( 'Half browser height', 'yup' ), 'is-fullheight' => esc_html__( 'Full browser height', 'yup' ), ), 'default' => 'is-fullheight' ) ); $cmb_hero->add_field( array( 'name' => esc_html__( 'Hero Background Color', 'yup' ), 'desc' => esc_html__( 'The background color of the hero (useful if there is no image)', 'yup' ), 'id' => $prefix . 'bg_color', 'type' => 'select', 'show_option_none' => true, 'options' => array( 'is-red' => esc_html__( 'Red', 'yup' ), 'is-orange' => esc_html__( 'Orange', 'yup' ), 'is-yellow' => esc_html__( 'Yellow', 'yup' ), 'is-green' => esc_html__( 'Green', 'yup' ), 'is-light-blue' => esc_html__( 'Light Blue', 'yup' ), 'is-blue' => esc_html__( 'Blue', 'yup' ), 'is-purple' => esc_html__( 'Purple', 'yup' ), 'is-pink' => esc_html__( 'Pink', 'yup' ), 'is-brown' => esc_html__( 'Brown', 'yup' ), 'is-dark' => esc_html__( 'Dark', 'yup' ), ), ) ); $cmb_hero->add_field( array( 'name' => esc_html__( 'Display mouse scroll icon', 'yup' ), 'desc' => esc_html__( 'Tick this if you want to show a mouse scroll icon at the bottom of the section', 'yup' ), 'id' => $prefix . 'mouse_icon', 'type' => 'checkbox', ) ); }The before/after for 4.9 is a good point to make, and will help with possible debugging.
Thanks.
FYI: Not 100% that happened after WP4.9 but I guess so because a couple of weeks ago it worked. Thanks! 😉
-
This reply was modified 8 years, 6 months ago by
pacovitiello.
It looks like you’re using a
rgba_colorpickerfield type. I don’t know what that is, but it’s not part of CMB2 core. Your best bet is to open this issue with the author of that field type.Author is me 😀 I coded that theme more than one year ago and, if I recall, I used only CMB2 core fields. Anyway, I will revise the code trying to figure out what’s wrong. Thanks for advising!
-
This reply was modified 8 years, 6 months ago by
pacovitiello.
Hey Justin, I forgot I was using Jay Wood’s CMB2_RGBa_Picker. JS was pretty outdated and causing the issue.
I was just looking at your announcement on Jay’s repo about alpha support. I thought that alpha option was already available on 2.2.6 but it isn’t (I’ve tried adding that option but it doesn’t work). Can you say when the update will be brought on CMB2 plugin? Cheers, P.
If you want to use it now, you can download/use the trunk branch on github. Not sure when the next release will be yet.
Thanks @jtsternberg, if you have plans to release the update soon I can wait 🙂
Just pushed the release to address a bug introduced in 2.2.6, so this functionality will be available.
Great!
-
This reply was modified 8 years, 6 months ago by
The topic ‘Color picker issue’ is closed to new replies.