I found a similar post from 2023, but my issue is a bit different.
"Local site not loading Google fonts.
When previewing my Local site, the Google fonts are not being observed. I’ve cleared my cache, disabled all plugins that cache, installed the Local Google Fonts plugin to store a local copy of the font to no avail. I’ve also tried flushing my browser cache and opening local in a private incognito window."
I’m using Elementor Pro, tried the latest version, get errors in Local, reverted back to 2 versions to stop errors, which I’m fine with that for now.
But I can’t get the Google fonts to display after I publish the page and try to view it in various browsers. Works fine on live site with same browsers.
It looks fine in Local, it’s only when I publish the page and then view the local page is it not displaying them. I even have the font installed on the PC itself, inside Elementor, though not needed. I’ve turn on and off the feature to use Google fonts locally within the Elementor settings.
Thanks for any ideas!
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
I am also having issue when trying to use Elementor v4.3.2, and have to revert back to v4.2.24
error in that is "Warning : Attempt to read property “ID” on null in D:\WordPress\LocalWP\zz-members\app\public\wp-content\plugins\elementor\core\base\document.php on line 356"
I am getting this in the dev console:
jquery-migrate.min.js?ver=3.4.1:2 JQMIGRATE: Migrate is installed, version 3.4.1
(index):1517 Access to font at ‘https://zz-members.com/wp-content/uploads/elementor/google-fonts/fonts/poppins-93818c37.woff2’ from origin ‘https://zz-members.local’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
poppins-93818c37.woff2:1 Failed to load resource: net::ERR_FAILED
(index):1517 Access to font at ‘https://zz-members.com/wp-content/uploads/elementor/google-fonts/fonts/poppins-de430313.woff2’ from origin ‘https://zz-members.local’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
poppins-de430313.woff2:1 Failed to load resource: net::ERR_FAILED
/wp-content/cache/wpo-fonts/display-swap-family-Abril-FatFace-ital-wght-0-400-0-700-1-400-1-700-family-Alegreya-ital-wght-0-400-0-700-1-400-1-700-family-Alegreya-Sans-ital-wght-0-400-0-700-1-400-1-700-family-Amatic-SC-ital-wght-f26c32473c745d576280062611857aa8bf28fe92.css:1 Failed to load resource: the server responded with a status of 404 ()
wpo-minify-footer-wo…1790537659.min.js:2 Uncaught SyntaxError: Cannot use import statement outside a module
display-swap-family-Abril-FatFace-ital-wght-0-400-0-700-1-400-1-700-family-Alegreya-ital-wght-0-400-0-700-1-400-1-700-family-Alegreya-Sans-ital-wght-0-400-0-700-1-400-1-700-family-Amatic-SC-ital-wght-f26c32473c745d576280062611857aa8bf28fe92.css:1 Failed to load resource: the server responded with a status of 404 ()
Whats also starge is the font name that brought this to my attention is actually called “Explora” which I don’t see above???
Thank you for those details @The-Papaw. This helps narrow down the issue further.
Your fonts are trying to load from https://zz-members.com (your live site), but Local is serving from https://zz-members.local. This creates a CORS (Cross-Origin Resource Sharing) block.
Access to font at 'https://zz-members.com/wp-content/uploads/elementor/google-fonts/fonts/poppins-93818c37.woff2'
from origin 'https://zz-members.local' has been blocked by CORS policy
You can try to fix this by doing some S/R in the database to correct the URLs:
I’m old Mr. Nick, when I quit designing websites, Dreamweaver and Frontpage were getting popular…haha. This Wordpress is all new to me. If I ran the WP-CLI correctly, it found the correct database, scanned it and completed, maybe 200-300 tables, but said this at the end:
Success: Made 0 Replacements
The WP Optimizer is disabled, caching or Minify within it was never activated or turned on, but I believe the font issue was before I had installed it. I deleted just to see if that would help, bbut didn’t.
Do you recommend any particular find/replace plugin?
I doubt it would help to delete Elementor & Elementor Pro and re-install them as it seems WP leaves everything in the DB when deleting plugins?
Elementor said it may be a server mismatch, the quote “Since you’re able to resolve it by rolling the standard Elementor plugin back to 4.2.4, I would recommend checking the LocalWP PHP version, WordPress version, active plugins, and the staging site’s configuration against the live site. You can also test with only Elementor + Elementor Pro active to rule out a plugin conflict.”
I’ve tried disabling all plugins, that didn’t work, running same version of PHP (8.5.1), WP version (7.12), only thing that works is either disable Elementor Pro (which site uses some it’s features) or revert standard Elementor back to version previous to 4.3
We don’t have MariaDB 11.8.9 in Local @The-Papaw but you could try creating a new, blank site with a Custom configuration and select the next lowest version, 10.6.23 and then manually import your site contents in there and see if that resolves the warnings.