For the sake of helping test/confirm, can you provide what version of WordPress you are on, what version of CMB2 you are on, and the CMB2 configuration you are using for some metaboxes here?
Latest version 4.9.1, I selected this while I created this support ticket.
It came bundled with this theme
https://themeforest.net/item/hemma-a-wordpress-theme-for-holiday-houses/15924438
the author of theme told me to contact you.
I don’t know what he used with your plugin.
CMB2 – Version 2.2.6.2
Hey Michael, I am the author of the theme raising the issue described above. It seems that the new colorpicker field raises a fatal error. Please have a look: https://cl.ly/oO2Q
Error is on a WP installation running PHP 7.2. It seems there isn’t any issue on lower PHP version, but I haven’t any chance to double check at the moment.
Here’s how I’ve been using the colorpicker in the theme:
$cmb_hero->add_field( array(
'name' => esc_html__( 'Fade color', 'hemma' ),
'desc' => esc_html__( 'Fade background image with an overlay color', 'hemma' ),
'id' => $prefix . 'color',
'type' => 'colorpicker',
'default' => 'rgba(53,63,73,0)',
'options' => array(
'alpha' => true,
),
) );
-
This reply was modified 6 years, 3 months ago by pacovitiello.
Hello, I was running php 7.2 and I reverted to php 7.1 and now everything is working fine.
Gotcha. Less an issue with the latest issue breaking things, more an issue with the current released version not being compatible with PHP7.2 yet.
See the following issues/commits on GitHub related to this and in the trunk branch.
Related issues:
https://github.com/CMB2/CMB2/issues/1070
https://github.com/CMB2/CMB2/issues/1074
https://github.com/CMB2/CMB2/issues/1075
Related commits to address issues:
https://github.com/CMB2/CMB2/commit/66b56ffba01ace1da1d649157619147777d43a99
The commit above isn’t so huge that it couldn’t be manually typed in, if you really want to use both CMB2 and PHP7.2, for what it’s worth. It’s mostly just passing parameters to some spots, to match PHP function signatures.