- This topic has 11 replies, 3 voices, and was last updated 3 years, 9 months ago by Tom.
August 14, 2018 at 7:53 am #647895Charles
I’m getting the Access-Control console errors on my WordPress site, and the search icon is missing. I tried the chosen solution to add Access-Control to .htaccess but it didn’t work – in fact it completely broke the site. It could be that I put the .htaccess code in the wrong place, since in WordPress there are at least 3 places where you can place an .htaccess file.
I also tried installing a font awesome plugin, which I would have thought would give access, but it didn’t do anything. I thought I saw somewhere in an old post that you were going to build font awesome into the theme so it doesn’t rely on a CDN link.
Anyway, how can I fix the errors on my site?
Actually I see it’s there on the https:// version – it’s just in http:// – so I’m going to contact my host provider and ask them why there are two separate versions.
CharlesAugust 14, 2018 at 10:10 am #648023LeoStaffCustomer Support
This should help:
Let me know 🙂August 16, 2018 at 6:52 am #650540Charles
That’s what I was referring to. I already found that page, where Tom posted this link https://davidwalsh.name/cdn-fonts to the page about the .htaccess file solution. I tried adding that code in the .htaccess file in my WordPress installation folder and it broke the whole css layout.
It seems to be intermittently working now that an SSL certificate has been installed. On some page loads it appears, on some it doesn’t.
https://southeglinton.ca/ – beside Twitter icon in menu.August 16, 2018 at 10:09 am #650894TomLead DeveloperLead Developer
For some reason the icons are being looked up without the
wwwwhich your site uses.
What URLs do you have set in “Settings > General”? With
wwwor without?August 16, 2018 at 2:25 pm #651158Charles
I just had an SSL certificate installed and I changed the settings in General to https://www.southeglinton.ca
However, the named permalinks aren’t working, so for now as a workaround I changed them to the plain ones. I changed the URLs in ‘wp_options’ in the db to https but that hasn’t fixed it yet. I used to have a list of the exact fields in the db to change URLs when migrating a site manually, but I can’t find it. Do you happen to know where that is?
CharlesAugust 16, 2018 at 8:37 pm #651356TomLead DeveloperLead DeveloperAugust 17, 2018 at 7:05 am #651799Charles
Yes it does. There’s something else going on that I can’t figure out, only on the home page. Because now that I have set the permalinks to plain it has reverted to the insecure icon – but just on the home page. If I put the permalinks back to the named ones the home page icon goes green but the links to the article posts don’t work. The articles are in custom post types – maybe there’s a separate linking in the db to those.August 17, 2018 at 8:44 am #651955TomLead DeveloperLead Developer
The insecure notice is happening because the page contains a form that targets an insecure endpoint (http://youurl.com/serra-calendar).
Perhaps contact your hosting about the other issue. If they inspect your site in developer tools, they will see that all font-related resources are being loaded without the
www. Perhaps there’s a server setting that needs to be tweaked.August 20, 2018 at 7:21 am #654312Charles
The first issue is fixed. As for the font awesome search icon I see the link to font awesome is:
Are you saying that if it was (no www):
It would work?
TomAugust 20, 2018 at 9:34 am #654598TomLead DeveloperLead Developer
Since you’re using
www, all of the resources need to load using
If you have resources loading without
www, you’ll run into errors like this.August 21, 2018 at 11:55 am #656034Charles
None of the htaccess solutions worked. What did work, as you pointed out, was removing
wwwfrom the site URLs.
Might be an idea in future when this comes up to tell people to just remove
www– there are a lot of “solutions” in your forum and online with various htaccess code suggestions, many of which just removed all css code, and none of them had any affect on font awesome.
CharlesAugust 21, 2018 at 5:04 pm #656249
- You must be logged in to reply to this topic.