CMB2-Post-Search-field
CMB2-Post-Search-field copied to clipboard
Not working on the latest version of wordpress
Current Code:
$cmb->add_field( array(
'name' => __( 'Button Link' ),
'id' => 'home_hero_button_link',
'type' => 'post_search_text', // This field type
// post type also as array
'post_type' => ['page','product','post','topic','tips','nugget', 'forum','authors','faqs'],
// Default is 'checkbox', used in the modal view to select the post type
'select_type' => 'radio',
// Will replace any selection with selection from modal. Default is 'add'
'select_behavior' => 'replace',
) );
After i updated to wordpress the fields shows empty, the label shows but the input itself is not showing up
Any console errors in your browser dev tools?
@tw2113 - no errors in wplog file on console
console

How it shows in wordpress (no input field)


here are some info:
cmb2 version: 2.5.1 wordpress version: 5.1.1 php: 7.2
Will try it out myself shortly, but is there any reason you're not updated to version 2.6.0 for CMB2? Just in case there may be fixes that help with it?
Not presently managing to recreate the issue myself with either CMB2 version 2.5.1 or 2.6.0. I did a fresh clone of the Post Search Field repo, since I didn't already have this one locally, so it's whatever version the master branch is at, which looks to be 0.2.5.
While there may not be any errors specific to CMB2 in the dev console, that doesn't mean that other errors shown aren't interfering in the long term. Is it a site where you could deactivate other things temporarily to see if the error goes away in those states?