Icon Fonts Not Displayed On modules Enable Cors

If the icon fonts that your site uses are not displaying on the Module pages you most likely need to enable CORS (Cross Origin Resource Sharing). This will allow the browser to use the font files hosted on your main domain, on the sub-domain in use for your modules.

cors-issue-example
Example of Icons not displaying because of CORS not being enabled.

Typically this can be done by making a simple update to your .htaccess file (if your site is on an Apache server).

More information about enabling CORS, including instructions for various web server technologies, is available at www.enable-cors.org

Example of CORS update for a WordPress site:

  1. Access your .htaccess file via FTP (note that if you do not see your .htaccess file when logged in you will need to locate and enable a setting to show hidden files)
  2. Add the following line to the end of the file and save:
    Header set Access-Control-Allow-Origin "http://aname.yourorganization.org"

    Where the text between the double quotes (“”) is your organization’s ChamberMaster or MemberZone location. For instance, this text could be something like:

    http://business.mychamber.com
    or
    http://members.myassociation.com

The entire section of code above should appear on a single line in your .htaccess file without a line break.  Placing it on two lines will break your site.  It displays as two lines above due to width constraints, but is only one line.  Also be sure not to copy paste the code above into Microsoft Word or into an editor  which turns the straight double quotes above into “curly quotes” prior to adding it to your .htaccess file because this would also break your site. Here is an example of what the htaccess file will look like.

Note that if you are not comfortable with modifying your .htaccess file, it is important to get assistance because a mis-configured .htaccess file can take down your site.  Be sure to make a backup of the file before uploading any changes and test your changes immediately.

If you have implemented it correctly the icons will be visible on the module pages once you refresh the page. If the modules still do not display the font/icons correctly, the .htaccess rule may have been placed in the incorrect location. Though placing the rule in the root .htaccess file may work in most cases, there could be other .htaccess files that are located in the site’s structure that are taking precedence over the root. If you suspect this is the case, please instead modify the .htaccess file that is in the closest folder to the font file.