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

Error Customizer not working #1659

Closed
daviedR opened this issue Nov 21, 2017 · 6 comments
Closed

Error Customizer not working #1659

daviedR opened this issue Nov 21, 2017 · 6 comments
Milestone

Comments

@daviedR
Copy link

daviedR commented Nov 21, 2017

WordPress version: 4.9
Kirki version: 3.0.16

screen shot 2017-11-21 at 8 55 24 pm

Not sure about the "Unknown key" error

The first error, is because I use "line break" among the output "element" selectors.

screen shot 2017-11-21 at 8 52 47 pm

Please help ASAP

Thanks

@aristath
Copy link
Contributor

Can you please post the code you're using so that I may replicate your issue and find where the error occurs?
Without a code sample to replicate the issue I don't even know where to start looking

@aristath aristath added this to the 3.0.17 milestone Nov 21, 2017
@daviedR
Copy link
Author

daviedR commented Nov 22, 2017

The first bug Invalid or unexpected token is caused by a line break and tab character on output definition. The code I used look like this:

	'output'      => array(
		array(
			'element' => '.button, button, input[type="button"], input[type="reset"], input[type="submit"],
				.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt.disabled, .woocommerce #respond input#submit.alt.disabled:hover, .woocommerce #respond input#submit.alt:disabled, .woocommerce #respond input#submit.alt:disabled:hover, .woocommerce #respond input#submit.alt:disabled[disabled], .woocommerce #respond input#submit.alt:disabled[disabled]:hover, .woocommerce a.button.alt.disabled, .woocommerce a.button.alt.disabled:hover, .woocommerce a.button.alt:disabled, .woocommerce a.button.alt:disabled:hover, .woocommerce a.button.alt:disabled[disabled], .woocommerce a.button.alt:disabled[disabled]:hover, .woocommerce button.button.alt.disabled, .woocommerce button.button.alt.disabled:hover, .woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled:hover, .woocommerce button.button.alt:disabled[disabled], .woocommerce button.button.alt:disabled[disabled]:hover, .woocommerce input.button.alt.disabled, .woocommerce input.button.alt.disabled:hover, .woocommerce input.button.alt:disabled, .woocommerce input.button.alt:disabled:hover, .woocommerce input.button.alt:disabled[disabled], .woocommerce input.button.alt:disabled[disabled]:hover, .woocommerce span.onsale, .woocommerce #respond input#submit.disabled, .woocommerce #respond input#submit:disabled, .woocommerce #respond input#submit:disabled[disabled], .woocommerce a.button.disabled, .woocommerce a.button:disabled, .woocommerce a.button:disabled[disabled], .woocommerce button.button.disabled, .woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled], .woocommerce input.button.disabled, .woocommerce input.button:disabled, .woocommerce input.button:disabled[disabled]',
			'property' => 'background-color',
		),
	),

The older version works fine with line break and tab.

About the 2nd error, turns out I used and increment integer for the key of partial_refresh. Something like this:

	'partial_refresh' => array(
		$p++ => array(
			'selector'        => '#topbar',
			'render_callback' => 'render_topbar',
			'container_inclusive' => true,
		),
	),

The error is from WordPress javascript, so I guess I have to change the way I named the key.

@aristath
Copy link
Contributor

Can you please check using the develop branch now? Should be fixed (see commit)

@thehung2224
Copy link

@aristath It doesn't work for me

image

@aristath
Copy link
Contributor

@thehung2224 I don't see what your issue has to do with the issue reported in the original post.
Your issue is about the code control. And yes, there is currently a bug with code controls.
Will be fixed ASAP, there was just another bug with radio controls that had to be adressed first because radio controls, textareas etc are a lot more frequently used than code controls.

@thehung2224
Copy link

It's working now.

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

3 participants