-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: $id(...).hide(...).farbtastic is not a function #333
Comments
The only reason that would happen is if this condition: |
But on version CMB2 2.0.6 this error not appears. I replacing worpdress jquery with cdn, need to test this out. Thanks. |
If you're replacing default WordPress scripts, there's not much I can do to help. |
I get this same error when I'm on a custom options page (specifically with the file upload field). When it's within a page it appears to be working fine. I am using the WP plugin version. |
I too was getting the same error using the version up here on GitHub and the version found in the WordPress plugin repo. Whenever I included a color picker field I was getting the same error as the OP. This was on a fresh TwentyFifteen install with no other plugins installed/active. Adding the following, just below colorpicker field definition, did the trick for me: wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script( 'wp-color-picker' ); Example in the /**
* Options fields ids only need
* to be unique within this option group.
* Prefix is not needed.
*/
$cmb_options->add_field( array(
'name' => __( 'Site Background Color', 'cmb2' ),
'desc' => __( 'field description (optional)', 'cmb2' ),
'id' => 'bg_color',
'type' => 'colorpicker',
'default' => '#ffffff',
) );
wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script( 'wp-color-picker' ); It seems to only be the color picker field that's causing this issue. Evan |
Thanks for reporting. The issue should be addressed in 244d39f |
* Fix color-picker field not enqueueing the colorpicker script. ([#333](CMB2/CMB2#333)) git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1171878 b8457f37-d9ea-0310-8a92-e5e31aec5664
Getting error form js file:
Uncaught TypeError: $id(...).hide(...).farbtastic is not a function
and of course all js based repeatable UI elements dont work.Wordpress: 4.2.2
CMB: dev-trunk
The text was updated successfully, but these errors were encountered: