civicrm / org.civicrm.shoreditch

Other
45 stars 59 forks source link

Shoreditch extension for clean themeis good except won't display civicrm icons (up,down ...) #485

Closed barbarae closed 3 years ago

barbarae commented 3 years ago

I am using the shoreditch theme on drupal 7.77 civicrm 5.32.2 running on Siteground.com and all is fine except the civicrm icons when selecting a list of options at Options Group .../civicrm/admin/options?action=browse&reset=1. The civicrm icons will not display and instead I get the following: 2021-01-15T14:32:03.047Z CRM.payment: loaded via DOMContentLoaded options?action=browse&reset=1:1 Access to font at 'https://www.jandbwebsite.com/jandbweb/sites/default/files/civicrm/ext/org.civicrm.shoreditch/org.civicrm.shoreditch-master/fonts/open-sans/OpenSans-Regular-webfont.woff' from origin 'https://jandbwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. OpenSans-Regular-webfont.woff:1 Failed to load resource: net::ERR_FAILED options?action=browse&reset=1:1 Access to font at 'https://www.jandbwebsite.com/jandbweb/sites/default/files/civicrm/ext/org.civicrm.shoreditch/org.civicrm.shoreditch-master/fonts/open-sans/OpenSans-Semibold-webfont.woff' from origin 'https://jandbwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. OpenSans-Semibold-webfont.woff:1 Failed to load resource: net::ERR_FAILED options?action=browse&reset=1:1 Access to font at 'https://www.jandbwebsite.com/jandbweb/sites/default/files/civicrm/ext/org.civicrm.shoreditch/org.civicrm.shoreditch-master/fonts/font-awesome/fontawesome-webfont.woff2?v=4.7.0' from origin 'https://jandbwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. fontawesome-webfont.woff2:1 Failed to load resource: net::ERR_FAILED options?action=browse&reset=1:1 Access to font at 'https://www.jandbwebsite.com/jandbweb/sites/default/files/civicrm/ext/org.civicrm.shoreditch/org.civicrm.shoreditch-master/fonts/open-sans/OpenSans-Bold-webfont.woff' from origin 'https://jandbwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. OpenSans-Bold-webfont.woff:1 Failed to load resource: net::ERR_FAILED logo_sm.png:1 Failed to load resource: the server responded with a status of 404 () options?action=browse&reset=1:1 Access to font at 'https://www.jandbwebsite.com/jandbweb/sites/default/files/civicrm/ext/org.civicrm.shoreditch/org.civicrm.shoreditch-master/fonts/open-sans/OpenSans-Bold-webfont.ttf' from origin 'https://jandbwebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. OpenSans-Bold-webfont.ttf:1 Failed to load resource: net::ERR_FAILED www.jandbwebsite.com/jandbweb//home/customer/www/jandbweb.jandbwebsite.com/public_html/sites/all/modules/civicrm/js/jquery/jquery.crmEditable.js?r=ZD9Sm:1 Failed to load resource: the server responded with a status of 404 () last.gif:1 Failed to load resource: the server responded with a status of 404 () up.gif:1 Failed to load resource: the server responded with a status of 404 () spacer.gif:1 Failed to load resource: the server responded with a status of 404 () first.gif:1 Failed to load resource: the server responded with a status of 404 () down.gif:1 Failed to load resource: the server responded with a status of 404 () last.gif:1 Failed to load resource: the server responded with a status of 404 () down.gif:1 Failed to load resource: the server responded with a status of 404 () first.gif:1 Failed to load resource: the server responded with a status of 404 () spacer.gif:1 Failed to load resource: the server responded with a status of 404 () up.gif:1 Failed to load resource: the server responded with a status of 404 ()

The "not found" images do exist in the correct location, but they have been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have tried adding Access-Control-Allow-Origin to an .htaccess file under bootstrap, and under my civicrm extensions folder:

<FilesMatch ".(ttf|otf|eot|woff|woff2)$">

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

barbarae commented 3 years ago

I fixed this with a file I created under my drupal root called "settings_location.php".

// Create a new file - settings_location.php // Enter the following code (substitute the actual location of your // /sites directory) <?php define( 'CIVICRM_CONFDIR', 'home/customer/www/jandbweb.jandbwebsite.com/public_html/sites' ); // define('CIVICRM_CONFDIR', 'jandbwebsite.com/jandbweb/public_html/sites'); ?>

So - I have up and down arrow icons now in shoreditch.