Hi olimax,
I am not managing to recreate the issue. Don’t mind the terseness in some of the code spots below.
https://cloudup.com/cndG0FoPPvB
add_action( 'cmb2_admin_init', 'abc' );
function abc() {
$prefix = 'whatev_';
$cmb = new_cmb2_box( array(
'id' => '02_test',
'title' => __( 'Test Metabox 2', 'cmb2' ),
'object_types' => array( 'movie', ),
) );
$cmb->add_field( array(
'id' => $prefix . 'test',
'title' => 'Test',
'type' => 'text_date_timestamp'
));
}
My guess is that you have a javascript issue occurring on the page from another source and it’s preventing the CMB2 field from working properly. However, I would need more information like any errors shown in your browser’s javascript console, to be certain.
Thread Starter
olimax
(@olimax)
Much appreciated, Micheal
You are right
I thought I had js errors flagged but it was turned off in Firebug
Turns out it was Yoast SEO. Their last bug fix 3.0.4 from a few days ago supposedly addressed it, specifically citing CMB2, but still the problem remains. Hopefully they will have another go
I know which I would rather do without if it came to it
I couldn’t work without your invaluable tool
Many thanks
Ah yeah, Team Yoast hasn’t had a fun week or so with that release. I’m keeping my eye on it as well for various reasons.
If you updated to 3.0.4 and still see the issue, I’d first clear your browser cache, and if you still see it, report the exact error to their support team.