Skip to content
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

Field type number : Cannot read property 'min' of undefined #911

Closed
shaylash opened this issue Apr 19, 2016 · 2 comments
Closed

Field type number : Cannot read property 'min' of undefined #911

shaylash opened this issue Apr 19, 2016 · 2 comments

Comments

@shaylash
Copy link

Issue description:

Thanks a lot for the quick reply.

Issue description
I have tried this also seeing this bug report #644 but adding the choices array does not fix it for me. I get the same error with number.js and min being not defined

Version used:

develop (2.3.1), 2.3.0

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

Kirki::add_field( 'my_theme', array(
'type' => 'number',
'settings' => 'test_setting',
'label' => esc_attr__( 'This is a test', 'neko' ),
'section' => 'test_section',
'default' => 25,
'priority' => 1,
'choices' => array(
'min' => 0,
'max' => 30,
'step' => 1,
),
) );

Kirki::add_section( 'test_section', array(
'title' => esc_html__( 'Test', 'neko' ),
'description' => '',
'panel' => '', // Not typically needed.
'priority' => 20,
'capability' => 'edit_theme_options',
'theme_supports' => '' // Rarely needed.
));

Kirki::add_config( 'my_theme', array(
'capability' => 'edit_theme_options',
'option_type' => 'theme_mod',
));

error : "Uncaught TypeError: Cannot read property 'min' of undefined number.js?ver=4.5"

Just in case the field type slider does work (which as a very similar structure)

Thanks again for this great plugin and the hard work ;) .

@aristath
Copy link
Contributor

fixed

@shaylash
Copy link
Author

Ok cool thanks.
I found what was going on on my side.
Have a good day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants