• Resolved alinst220

    (@alinst220)


    Hello,
    I am using a theme with the Kirki plugin and after the update over the 3.0.10 all text in site is white. In the customize section the is no font color settings.
    I tried to debug this problem but i had no success.
    Please help. 🙂
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Toxicus

    (@toxicus)

    Same here. All the fonts became white.

    Thread Starter alinst220

    (@alinst220)

    Did you manage to get a solution?

    L.E.: I downgraded the WordPress from 4.9 to 4.8 and the kirki from 3.0.16 to 3.0.10.
    Now is perfect! All the problems are gone.

    • This reply was modified 8 years ago by alinst220.
    Toxicus

    (@toxicus)

    I still can’t find solution. The problem is that our clients already upgraded WordPress to 4.9 and the color pickers now messed up. But if I upgrade to Kirki 3.0.16 the pickers are fine but the titles are white. 🙂

    Which themes are you guys using?
    I’m still unable to replicate this one and I want to include a fix for this is 3.0.17 – but so far I can’t solve it because I can’t even find the issue without first replicating it.

    Toxicus

    (@toxicus)

    I’m using our own theme and here is the code for headings. As you can see the color for all headings is specified as #444, but then I want to change only the size for H1, and the color to be fetched from all headings. Before in 3.0.10 it was working just fine. But when I check customizer now it shows color #ffffff for H1 heading – http://clip2net.com/s/3PXrIMe
    So as I understand if you don’t define a color for H1, it replaces with default #ffffff; Before it simply didn’t render color: #ffffff;.

    
    Kirki::add_field( 'deo_config', array(
      'type'        => 'typography',
      'settings'    => 'deo_headings_typography',
      'label'       => __( 'Headings Typography', 'inka' ),
      'description' => __( 'Select the main typography options for your site.', 'inka' ),
      'help'        => __( 'The typography options you set here apply to all content on your site.', 'inka' ),
      'section'     => 'deo_typography',
      'priority'    => 10,
      'default'     => array(
        'font-family'    => 'Maven Pro',
        'variant'        => '400',
        // 'font-size'      => '30px',
        'line-height'    => '1.3',
        'color'          => '#444',
        'letter-spacing' => '0.11em',
      ),
      'output' => array(
        array(
          'element' => 'h1,h2,h3,h4,h5,h6',
        ),
      ),
      'transport' => 'postMessage',
      'js_vars'   => array(
        array(
          'element'  => 'h1,h2,h3,h4,h5,h6',
          'function' => 'css',
          'property' => 'color'
        ),
      )
    ));
    
    // H1 control
    Kirki::add_field( 'deo_config', array(
      'type'        => 'typography',
      'settings'    => 'deo_headings_h1',
      'label'       => __( 'H1 Headings', 'inka' ),
      'section'     => 'deo_typography',
      'priority'    => 10,
      'default'     => array(
        'font-size'      => '28px',
        'variant'        => '400'
      ),
      'output' => array(
        array(
          'element' => 'h1',
        ),
      ),
      'transport' => 'postMessage',
      'js_vars'   => array(
        array(
          'element'  => 'h1',
          'function' => 'css',
          'property' => 'font-size',
        ),
      )
    ));
    
    • This reply was modified 8 years ago by Toxicus.

    @toxicus Can you please test this using the develop branch from github? I’m unable to replicate the issue using that version, perhaps it has already been fixed there: https://github.com/aristath/kirki/archive/develop.zip

    Also just a note on your code:
    You don’t need to use js_vars. If you set transport to auto in your fields, then the js_vars will be auto-calculated from the output argument. So your code will be shorter and easier to maintain like this:

    
    Kirki::add_field( 'deo_config', array(
      'type'        => 'typography',
      'settings'    => 'deo_headings_typography',
      'label'       => __( 'Headings Typography', 'inka' ),
      'description' => __( 'Select the main typography options for your site.', 'inka' ),
      'help'        => __( 'The typography options you set here apply to all content on your site.', 'inka' ),
      'section'     => 'deo_typography',
      'priority'    => 10,
      'transport'   => 'auto',
      'default'     => array(
        'font-family'    => 'Maven Pro',
        'variant'        => '400',
        'line-height'    => '1.3',
        'color'          => '#444',
        'letter-spacing' => '0.11em',
      ),
      'output' => array(
        array(
          'element' => 'h1,h2,h3,h4,h5,h6',
        ),
      ),
    ));
    
    // H1 control
    Kirki::add_field( 'deo_config', array(
      'type'        => 'typography',
      'settings'    => 'deo_headings_h1',
      'label'       => __( 'H1 Headings', 'inka' ),
      'section'     => 'deo_typography',
      'priority'    => 10,
      'transport'   => 'auto',
      'default'     => array(
        'font-size'      => '28px',
        'variant'        => '400'
      ),
      'output' => array(
        array(
          'element' => 'h1',
        ),
      ),
    ));
    
    Toxicus

    (@toxicus)

    Hello.

    Tried develop branch, but still see white headings. The only way I can fix it if I rename settings value to something different, like titles_h1, so it will create new record in DB. So obviously something wrong with compatibility of DB value from the previous Kirki with the new Kirki 🙂
    Thanks for suggestion about js_vars, it’s much cleaner this way.

    Tried develop branch, but still see white headings. The only way I can fix it if I rename settings value to something different

    I see… This was actually a bug in v3.0.10 where values that were not even defined in the default array were being saved.
    It has since been fixed but it looks like something went through.

    I just pushed another commit in https://github.com/aristath/kirki/commit/783d0dc536f42a553719b1f0c0fcd74a2883c62d that should fix this, can you please check the develop branch again? I apologise for the back and forth, but since I can’t replicate the issue myself we have to resort to this kind of thing.

    You can get the latest develop version from https://github.com/aristath/kirki/archive/develop.zip

    If that doesn’t work either, is there any chance I can get access to your server so that I may debug the issue and release an update for this ASAP?

    Toxicus

    (@toxicus)

    Yes, it’s working. Right now only the font-size is showing, no more default values.

    Excellent! I’ll try to release v3.0.17 today so that others can get that fix too. I’m just waiting for another user to confirm the fix to another ticket first. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘White font after updateing to 3.0.16’ is closed to new replies.