themeum/kirki

Thank you for this awesome plugin, But I could not solve font-face src's URLs problem

ali-han opened this issue · 2 comments

Issue description:

Thank you for this awesome plugin. I use this plugin in more than 100 themes. But I could not solve this problem.

I included Kirki in my custom theme. But I see them instead of font url. Look "src"

src: url(/na/content/live/devair/wp-content/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCRc-AMP6lbBP.woff) format('woff');

How can i solve this problem?
Thanks

My html source code:

`

@font-face {
  | font-family: 'Roboto';
  | font-style: normal;
  | font-weight: 300;
  | font-display: swap;
  | src: url(/na/content/live/devair/wp-content/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCRc-AMP6lbBP.woff) format('woff');
  | unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
  | }
  | /* cyrillic /
  | @font-face {
  | font-family: 'Roboto';
  | font-style: normal;
  | font-weight: 300;
  | font-display: swap;
  | src: url(/na/content/live/devair/wp-content/fonts/roboto/KFOlCnqEu92Fr1MmSU5fABc-AMP6lbBP.woff) format('woff');
  | unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  | }
  | /
greek-ext /
  | @font-face {
  | font-family: 'Roboto';
  | font-style: normal;
  | font-weight: 300;
  | font-display: swap;
  | src: url(/na/content/live/devair/wp-content/fonts/roboto/KFOlCnqEu92Fr1MmSU5fCBc-AMP6lbBP.woff) format('woff');
  | unicode-range: U+1F00-1FFF;
  | }
  | /
greek */
  | @font-face {
  | font-family: 'Roboto';
  | font-style: normal;
  | font-weight: 300;
  | font-display: swap;
  | src: url(/na/content/live/devair/wp-content/fonts/roboto/KFOlCnqEu92Fr1MmSU5fBxc-AMP6lbBP.woff) format('woff');
  | unicode-range: U+0370-03FF;
  | }

`

Version used:

4.0.21

Using theme_mods or options?

theme_mods

PHP error messages that might be related

none

JS error messages that might be related

none

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

Kirki::add_field( $config, [
		'type'			=> 'typography',
		'settings'		=> 'font-body',
		'section'		=> 'section_typography',
		'priority'		=> 10,
		'transport'		=> 'auto',
		'label'			=> __( 'Site font', 'air' ),
		'description'	=> __( '(body, roboto 400, 16px)', 'air' ),
		'default' => [
			'font-family'	 => 'Roboto',
			'variant'		 => 'regular',
			'font-style'	 => 'normal',
			'color'			 => '#000000',
			'font-size'		 => '16px',
			'line-height'	 => '1.5',
			'letter-spacing' => '0',
			'text-transform' => 'none',
			'text-decoration'=> 'none',
			'text-align'     => 'left',
		],
		'output'      => [
			[
				'element' => 'body',
			],
		],
] );

I must be missing something but I don't see what's wrong here.

Thanks David

I deleted the fonts folders and cleared the Kirki font cache.

example.com/?action=kirki-reset-cache (I think this method is the right way.)

However, this problem persists. I use this path in my development environment => /na/content/live/devair/...
The production environment has a different path. But Kirki still caches this value somewhere.

I had this issue when I moved the site from dev to production environment in WP-ENGINE.

Where do you think I should look?

Thanks for Page-Builder-Framework too. I use it on 5 sites too :))