• Resolved minhazulOO7

    (@minhazul007)


    Getting this error on chrome dev tools console,

    Refused to apply style from 'https://example.com/#' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

    The line where this issue originates,

    <link rel='stylesheet' id='companion-bundle-css' href="#" data-href='https://example.com/wp-content/plugins/mesmerize-companion/theme-data/mesmerize/assets/css/companion.bundle.min.css' type='text/css' media='all' />

    Please fix it ASAP! It’s also making the site slow by adding 1-2sec extra loading time.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter minhazulOO7

    (@minhazul007)

    I think this is the code,

    667	        function mesmerize_defer_css_scripts( $tag ) {
    668	        $matches = array(
    669	                'fonts.googleapis.com',
    670	                'companion.bundle.min.css',
    671	        );
    672	
    673	    if ( ! mesmerize_is_customize_preview()) {
    674	        foreach ($matches as $match) {
    675	            if (strpos($tag, $match) !== false) {
    676	                return str_replace('href', 'href="#" data-href', $tag);
    677	                        }
    678	                }
    679	        }
    680	
    681	        return $tag;
    682	}
    Thread Starter minhazulOO7

    (@minhazul007)

    Just removing href="#" fixed the error. No error are shown.

    676 return str_replace('href', 'data-href', $tag);

    Thread Starter minhazulOO7

    (@minhazul007)

    Also If I put href="" it works also,

    676 return str_replace('href', 'href="" data-href', $tag);

    Thread Starter minhazulOO7

    (@minhazul007)

    667 function mesmerize_defer_css_scripts( $tag ) {
    668 $matches = array(
    669 ‘fonts.googleapis.com’,
    670 ‘companion.bundle.min.css’,
    671 );
    672
    673 if ( ! mesmerize_is_customize_preview()) {
    674 foreach ($matches as $match) {
    675 if (strpos($tag, $match) !== false) {
    676 return str_replace(‘href’, ‘href=”#” data-href’, $tag);
    677 }
    678 }
    679 }
    680
    681 return $tag;
    682 }

    This is on inc > functions.php

    • This reply was modified 4 years, 6 months ago by minhazulOO7.
    Thread Starter minhazulOO7

    (@minhazul007)

    This seems fixed on 1.6.97. inc > functions.php > Line 676

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Refused to apply style from ‘https://example.com/#’’ is closed to new replies.