[Support request] Access-Control errors – missing search icon

Home Forums Support [Support request] Access-Control errors – missing search icon

Home Forums Support Access-Control errors – missing search icon

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #647895
    Charles

    Hi Tom,

    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.

    Thanks
    Charles

    #648023
    Leo
    Staff
    Customer Support

    Hi there,

    This should help:
    https://generatepress.com/forums/topic/search-icon-missing/#post-528584

    Let me know ๐Ÿ™‚

    #650540
    Charles

    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.

    Charles
    https://southeglinton.ca/ – beside Twitter icon in menu.

    #650894
    Tom
    Lead Developer
    Lead Developer

    For some reason the icons are being looked up without the www which your site uses.

    What URLs do you have set in “Settings > General”? With www or without?

    #651158
    Charles

    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?

    Charles

    #651356
    Tom
    Lead Developer
    Lead Developer

    The ones in wp_options should be it.

    Does your server have any non-www to www redirecting?

    #651799
    Charles

    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.

    #651955
    Tom
    Lead Developer
    Lead 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.

    #654312
    Charles

    The first issue is fixed. As for the font awesome search icon I see the link to font awesome is:

    https://www.myurl.ca/serrawp/wp-content/plugins/easy-social-icons/css/font-awesome/css/font-awesome.min.css?ver=4.7

    Are you saying that if it was (no www):

    https://myurl.ca/serrawp/wp-content/plugins/easy-social-icons/css/font-awesome/css/font-awesome.min.css?ver=4.7

    It would work?

    Thanks
    Tom

    #654598
    Tom
    Lead Developer
    Lead Developer

    Since you’re using www, all of the resources need to load using www as well.

    If you have resources loading without www, you’ll run into errors like this.

    #656034
    Charles

    None of the htaccess solutions worked. What did work, as you pointed out, was removing www from 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.

    Thanks Tom

    Charles

    #656249
    Tom
    Lead Developer
    Lead Developer

    Be sure to set up a 301 redirect from www to no-www ๐Ÿ™‚

    Glad I could help!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.