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

Multiple Subsets results in an error #1410

Closed
hellor0bot opened this issue Jun 23, 2017 · 7 comments
Closed

Multiple Subsets results in an error #1410

hellor0bot opened this issue Jun 23, 2017 · 7 comments
Milestone

Comments

@hellor0bot
Copy link

Issue description:

When selecting multiple subsets, I'm getting this error:

Notice: wp_add_inline_style was called <strong>incorrectly</strong>. Do not pass <code>&lt;style&gt;</code> tags to <code>wp_add_inline_style()</code>. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 3.7.0.) in /srv/www/theme/htdocs/wp-includes/functions.php on line 4139

Version used:

Develop

@aristath
Copy link
Contributor

I can't replicate this one...
Can you post your field's code?

@vlthemes
Copy link

Same issue

#1265

@aristath
Copy link
Contributor

Guys I still can't get this error.
Can one of you send me a theme where this happens with instructions on how to replicate?

@aristath
Copy link
Contributor

@hellor0bot @vlthemes @usmanshahzad So far I've been unable to replicate this issue.
Can one of you enable xdebug on your testing environments and post the complete trail here so that we figure out where and why this error occurs?
The reports provided so far mention nothing of any files in Kirki so it's really difficult to pinpoint where this happens.

@aristath
Copy link
Contributor

OK, @vlthemes just sent me his theme and I was able to replicate the issue.

And here's how xdebug can be really helpful when debugging.
If you enable xdebug, instead of the error mentioned in the original post, you'll see this instead:

wp-debug
From the Call Stack, I can now see that on pos.18, it says

wp_add_inline_style( string(28), string(5382) ) .../class-kirki-modules-css.php:196

Line 196 in the class-kirki-modules-css.php looks like this:

wp_add_inline_style( 'kirki-styles-' . $config_id, $styles );

If right above that line I add

var_dump( $styles );

I can now see this in my screen:

untitled

So the problem is that for some reason it can't get the font and throws an error which gets printed in the styles.

Continuing on with the debugging now, as soon as I have a solution I'll post back here.

@aristath
Copy link
Contributor

Fixed.

Please note that if checking on an existing site, you'll have to delete all transients from the db, or just wait 24hours for them to expire.

@hellor0bot
Copy link
Author

@aristath, sorry was away for a couple of days :( your fix is working fine on my end! Thanks a lot!

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