Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Frank Goossens

    (@futtta)

    well, I see

    06:10:17.441 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://vidahotyoga.com/wp-content/themes/Divi/core/admin/fonts/modules.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). 1 (unknown)

    so this definitively is the same problem and adding

    
    <FilesMatch “\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$”>
    Header set Access-Control-Allow-Origin “*”
    </FilesMatch>

    to both your staging and production really should fix things. if not I’d contact siteground support @erik-haagenstuff ..

    have a nice day,
    frank

    Thread Starter Erik HaagenStuff

    (@erik-haagenstuff)

    Well, thanks Frank!

    I’m not sure this is anything else on your end, but I’ll just post this here in case anyone else with the same problem is reading the thread.

    I tried the code above, and I also tried the longer snippet suggested at the bottom of this support thread https://www.ads-software.com/support/topic/autoptimize-changes-and-disables-icons-on-siteground-staging-server/

    Neither one fixed the problem though it seems like they should have. I cross posted my problem with the theme provider, the host, and at WPMUDev. If any of them come up with a solution that works I’ll post it back here.

    Plugin Author Frank Goossens

    (@futtta)

    it’s a mattter of fonts being subject to the same-domain policy which can be fixed with CORS, pretty sure siteground will be able to fix ??

    ivanatanasov

    (@ivanatanasov)

    @futtta – Ivan Atanasov here, part of the Senior Support team at SiteGround.

    I reviewed the ticket where Erik contacted us and explained the issue. Indeed, the problem was resolved, and it was like you said.

    It was done by defining the WP_SITEURL as staging1.vidahotyoga.com in the wp-config.php file.

    Plugin Author Frank Goossens

    (@futtta)

    thanks for the feedback @ivanatanasov; indeed the fact that SG staging by default has the site_url of production causes AO to load resources fonts from the production URL, which does not work as fonts are subject to the same-domain policy.

    have a nice day ??

    Thread Starter Erik HaagenStuff

    (@erik-haagenstuff)

    Thanks everyone for the help resolving this. All three solutions have their drawbacks…

    – exclude style.css makes it render fine in staging, but is a little risky to then delete the exclusion on the live site and hope for the best

    – turn off Autoptimize in staging, same drawback

    – Add the line of code to wp-config.php in staging, but just make sure to delete it after pushing to the live site

    I wish Siteground would automatically add that line of code when creating the staging site, and automatically remove the line of code when pushing from staging to live. Having to choose one of the three above kind of undermines the whole point of one click staging.

    Frank, thank you for the excellent and timely support on a FREE plugin. You rock!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Siteground font icon problem’ is closed to new replies.