• Resolved everade

    (@everade)


    I have a multi-language website using Polylang.
    When OMFG is set to Auto-Configure Subsets, it never detects the Cyrillic character subset.
    When i define them manually, it works fine, but then PageSpeed Insights tests seem to try to load latin fonts which don’t exist:
    /wp-content/uploads/omgf/google-fonts-1/rubik-normal-latin.woff2
    /wp-content/uploads/omgf/google-font-jost/jost-normal-cyrillic.woff2
    /wp-content/uploads/omgf/google-font-jost/jost-normal-latin.woff2

    Even though i don’t encounter these errors when visiting the website myself.

    These fonts are actually modified (removed all italic and some higher weights), so these fonts should be found individually inside the modded folder names instead.
    For example:
    https://i.postimg.cc/ZYLM7nbT/image.png

    Is there any way to fix or prevent this?

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

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Indeed, I’m not seeing the non-existent fonts you mentioned. So, I ran your site through Pagespeed to verify, and there I’m not seeing them either. Perhaps you were getting cached results? If you’re using a CDN, it might be Pagespeed was being served stale cache from the CDN.

    Thread Starter everade

    (@everade)

    No i’ve cleared both CDN and LightSpeed Cache multiple times by now and PageSpeed still reporting the same errors in the “Best Practices” section on both mobile and desktop tests. You must have missed it because it’s also in your own example you just shared. Just scroll down to the “Browser errors were logged to the console”.
    https://i.postimg.cc/3rC1xPyT/image.png

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Oh, oops. Sorry I missed that. I’ll check again and get back to you!

    Thread Starter everade

    (@everade)

    Thanks Daan !

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I just noticed that you have some code enabled somewhere that erases messages from the console. That’s why we’re not seeing them. Could you disable that code?

    Thread Starter everade

    (@everade)

    @daanvandenbergh

    Ugh?! I’m not aware of any such code. Do you have a snippet of it so i could search for it? Could it possibly be Cloudflare related?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Well, the code should be console.clear() but I’ve no idea where it’s located, though.

    Thread Starter everade

    (@everade)

    @daanvandenbergh

    I found a single console.clear() within my theme code, however it’s only in a single function that seems to related to the admin section when uploading a video file.
    I’ve commented it regardless and cleared the cache.
    Don’t see the errors still when loading the website, so i assume there might be still something else clearing the console. But i ran a search through the entire website code and wasn’t able to find another clear anywhere else.

    • This reply was modified 11 months, 1 week ago by everade.
    Thread Starter everade

    (@everade)

    @daanvandenbergh
    Any news on this? I have no idea what clears the error log, i really searched the entire source of my website including plugins. But the main culprit isn’t really about the cleared logs but the issue that the website tries to load fonts from non existing folders.

    Probably a bug in OMFG when setting up custom “don’t load” settings in the free version?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi again,

    Sorry for the late reply. Got hit with stomach flu right before Christmas, so that was a lot of fun.

    It’s not a bug in OMGF, because there’s no way OMGF “remembers” the old path where the files used to be stored. The way it works is as follows:

    • OMGF downloads the files to /uploads/omgf/stylesheet-name/
    • You modify the Optimize Local Fonts section, and to force a browser cache reset, OMGF rewrites the storage path to /uploads/omgf/stylesheet-name-mod-[5-random-chars]/. At this point, the previous storage path is removed and lost.

    So, it’s probably a stubborn caching issue, but in order to verify that we’d need the console logs, because it usually tells you exactly which file (and on which line) the wrong path is called.

    The fact that removing the console.clear() didn’t do anything, strengthens my believe that it’s a stubborn caching issue. You could try the following:

    • Manually remove the wp-content/cache directory,
    • And then flush any other server-side caches you might be using (also flush Cloudflare, because I noticed you used that, too)

    Thread Starter everade

    (@everade)

    Hey @daanvandenbergh

    I found the culprit for the console clearing. Cloudflare Turnstile does it after being initialized. So i temporarily disabled it on the main page and loaded the website. The logs are no longer cleared (yay), however there’s also no error to be found regarding the fonts! Only Google Pagespeed and other Website testers like webpagetest.org are reporting this error!

    Is it possible that OMFG isn’t initiated properly during these bot website tests? It’s just really weird that they’re pointing towards OMFG base folders.

    If you want to test yourself, Cloudflare Turnstile isn’t active on the “Quality” page for example. So there the log isn’t cleared, and there are also no errors. However if you run that same page through google’s pagespeed or webpagetest.org they still report the font errors.

    I think Elementor also’s got an option to prevent google fonts to be loaded (probably elementor exclusive though).
    And Cloudflare would also offer similar functionality. None of them are active, since i wasn’t sure how they would behave in conjunction with OMFG. Do you have any advice regarding those?

    Also tried manually deleting all cache (host files as you’ve suggested, host caching system, cloudflare cache, lightspeed cache, browser cache). I really doubt that it’s a caching issue at this point.

    • This reply was modified 10 months, 2 weeks ago by everade.
    • This reply was modified 10 months, 2 weeks ago by everade.
    • This reply was modified 10 months, 2 weeks ago by everade.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    The paths don’t make sense at all, first, there’s the missing -mod-xxxx part and then there’s the missing font-weight in the filename, e.g. jost-normal-cyrillic-400 Something seems to be stripping the paths.

    For the sake of testing, could you disable LiteSpeed?

    Thread Starter everade

    (@everade)

    Just ran a test with LiteSpeed deactivated.
    Which indeed does no longer trigger these errors!

    Was searching for these specific strings and found that only for guest visitors lightspeed creates and loads ucss files, which had these specific URLs saved. Seems as if LiteSpeed only considers bots as guests, as such it only loads ucss files for them and not for human visitors.

    LiteSpeed also doesn’t seem to clear these UCSS files when purging all cache, not even with “Empty Entire Cache”, as it doesn’t seem to consider UCSS as cache but instead is part of their “page optimization”.

    I guess this case can finally be closed. At least i’ve found the cause, so i should be able to tackle the rest from here.

    Thank you so much Daan for your continuous support, really appreciate it!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Well, look at that! I suppose the UCSS generator does something to the URLs to make them invalid. Because, just to clarify, even though they look like the old URL, the missing font-weight part gives away that something is actually stripping them. But what, I wouldn’t know.

    Good luck on your journey ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Auto-detect not detecting Cyrillic Subset’ is closed to new replies.