-
AuthorPosts
-
September 17, 2015 at 1:17 pm #504735
Hi Folks,
I have a small issue with a website i’m working on.
The icons are not appearing on my second domain. It works fine on the first one though.
I tried adding these codes:
.htaccess
<FilesMatch "\.(ttf|otf|woff|eot)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch> # Apache config <FilesMatch ".(eot|ttf|otf|woff)"> Header set Access-Control-Allow-Origin "*" </FilesMatch> # nginx config if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){ add_header Access-Control-Allow-Origin *; }
web.config
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*"/> </customHeaders> </httpProtocol> <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule></rules> </rewrite> </system.webServer> </configuration>
But it didn’t fix my issue
Hope you can help. Thank you for your time.
Cheers,
ArthithSeptember 17, 2015 at 2:40 pm #504814Hi Arthith!
Try removing that from your .htaccess file and just add this to see what happens.
Header set Access-Control-Allow-Origin "*"
Cheers!
ElliottSeptember 17, 2015 at 2:43 pm #504821No unfortunately that didn’t work
September 18, 2015 at 3:47 pm #505613Hey!
Not sure what it could be. Try contacting your hosting provider to see if they have any ideas.
Best regards,
ElliottSeptember 21, 2015 at 12:00 am #506156Hello Elliott, I contacted them and they said they can’t help me as this is an issue with the theme.
Would be really happy if someone from your team could look into this problem
September 21, 2015 at 2:34 pm #506438Hey!
you are using an old version of the theme. Try to upgrade to Enfold v3.3.2. and deactivate all plugins to see if one is causing this problem. Clear browser cache and hard refresh a few times. If that doe not help you might want to delete all theme files via FTP and get a fresh copy from your themeforest account.
Cheers!
AndySeptember 24, 2015 at 9:35 am #508229Just updated my theme & wordpress just to make sure but it’s still not working
September 25, 2015 at 8:32 am #508802Hey!
Try to replace the .htaccess file with this:
<FilesMatch "\.(ttf|otf|woff|eot)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>
It should fix the error in the console:
Font from origin 'http://www.gelbett.ch' has been blocked from loading by Cross-Origin Resource Sharing policy: The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin 'http://flexside.ch' is therefore not allowed access.
Best regards,
IsmaelSeptember 25, 2015 at 8:47 am #508810Thank you Ismael, I updated the code of .htcaccess but still nothing :(
September 25, 2015 at 9:02 am #508825Here are a couple of screenshots of the code / location of the files. Note: there wasn’t a .htaccess file in the directory (not even with the option “show hidden files”) at the beginning so i created this one my self.
September 26, 2015 at 12:39 pm #509477Hey!
did you delete all theme files via FTP and did you get a fresh copy from your themeforest account already? to make sure there are no missing or corrupted theme files. Does social icons work when activating a default WordPress theme?
Cheers!
AndySeptember 28, 2015 at 2:50 pm #510124Yes, I tried that as well, also got the newest version from theme forest but still nothing :/
September 28, 2015 at 5:06 pm #510282Hi!
what if you activate a default WordPress theme? do social icons work there for you?
Regards,
AndySeptember 29, 2015 at 3:55 pm #510809The Icons I used only exist in Enfold (Standard Fontello Icons) They don’t exist in the default WordPress theme
September 30, 2015 at 10:28 am #511286Hi!
I don’t think this issue is theme related and think it has more something to do with your server settings. I think the root of this issue is caused by this error, which appears on your website in chrome console:
Font from origin ‘http://www.gelbett.ch’ has been blocked from loading by Cross-Origin Resource Sharing policy: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed. Origin ‘http://flexside.ch’ is therefore not allowed access.
Are you using any CDN (content delivery network), as cloudflare etc.?
Show your host the error message from above. They should be able to fix it for you. You would have this error message with another theme as well.
Best regards,
AndyNovember 10, 2015 at 12:54 pm #533181Found an alternative solution thanks anyway! :)
-
AuthorPosts
- The topic ‘Icons / Social Icons Missing on Second Domain’ is closed to new replies.