Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avada migration urls not replaced

Tags:

wordpress

When I have transfered the avada theme I have some errors to do with the locahost settings cause I build the site locally and then transfered.

Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.ttf' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.woff?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fontawesome-webfont.ttf?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.
(index):1 Access to Font at 'http://localhost:8081/crescent/wp-content/plugins/fusion-builder/inc/lib/assets/fonts/fontawesome/fontawesome-webfont.woff2?v=4.7.0' from origin 'http://crescent.solitudesoftware.co.uk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crescent.solitudesoftware.co.uk' is therefore not allowed access.

However I cannot find where these are being stored to change the settings to the new url I have tried a replace plugin but its not picked the items up some reason.

like image 767
rogue1nib Avatar asked Dec 05 '22 13:12

rogue1nib


2 Answers

I had the same issue, it is a cache that is created by Avada theme.

To fix it reset the CSS and JS dynamic caches:

Avada > Theme Options > Advanced > Dynamic CSS & JS > Reset Fusion Caches

Screenshot

like image 152
Jonathan Pereira Avatar answered Dec 11 '22 23:12

Jonathan Pereira


Per this post: https://theme-fusion.com/knowledgebase/are-your-font-awesome-icons-or-custom-fonts-not-showing-up/

You can add to your HTACCESS:

# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>

I had the same issue for a migrated site, but was unable to determine a location in the DB where the old URL persisted. The HTACCESS fix isn't as desirable as actually resolving the bad record; however, it works!

like image 34
James Valeii Avatar answered Dec 11 '22 22:12

James Valeii