Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #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.
    Screenshot of the Icon

    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,
    Arthith

    #504814

    Hi Arthith!

    Try removing that from your .htaccess file and just add this to see what happens.

    Header set Access-Control-Allow-Origin "*"
    

    Cheers!
    Elliott

    #504821

    No unfortunately that didn’t work

    #505613

    Hey!

    Not sure what it could be. Try contacting your hosting provider to see if they have any ideas.

    Best regards,
    Elliott

    #506156

    Hello 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

    #506438

    Hey!

    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!
    Andy

    #508229

    Just updated my theme & wordpress just to make sure but it’s still not working

    #508802

    Hey!

    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,
    Ismael

    #508810

    Thank you Ismael, I updated the code of .htcaccess but still nothing :(

    #508825

    Here 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.

    #509477

    Hey!

    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!
    Andy

    #510124

    Yes, I tried that as well, also got the newest version from theme forest but still nothing :/

    #510282

    Hi!

    what if you activate a default WordPress theme? do social icons work there for you?

    Regards,
    Andy

    #510809

    The Icons I used only exist in Enfold (Standard Fontello Icons) They don’t exist in the default WordPress theme

    #511286

    Hi!

    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&#8217; 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&#8217; 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,
    Andy

    #533181

    Found an alternative solution thanks anyway! :)

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Icons / Social Icons Missing on Second Domain’ is closed to new replies.