A problem I'm running into frequently is font awesome when working locally (http://www.pagelines...t-tips-for-dms/)
Is that after deploying my site (I use Git and Beanstalkapp for this ) the font awesome is not working on the remote live site. This is because it's trying to load font awesome from my local example.dev/wp-content/whatever/font-awesome.file and not the live sites example.com/wp-content/whatever/font-awesome.file
So it would be awesome if font awesome would load from /wp-content/themes/dms/fonts without the need to specify the home url of the site. Technically it should be pretty easy I'd imagine? And it would solve the problem of working locally.
The problem with this is, that when I deploy my site and show it to a client, I'm still seeing the font awesome because example.dev/wp-content/whatever/font-awesome.file loads for me and finds it! But for my client it won't show. So as I never see the problem I naturally don't always remember to flush caches after deployment
Thank you very much!
I'd hope font awesome -urls would work after deploying from local to remote
Posted 24 March 2014 - 09:21 AM
Posted 27 May 2014 - 07:44 PM
under Resets menu just click Flush button, all css will be rebuilt using correct urls.
Posted 27 May 2014 - 07:48 PM
@Simon_P Thanks for the reply!
But is there any benefit from having the root of the url in the font awesome url?
So if we could have the exact same functionality and not have to flush the caches?
I even wonder if it would be a good idea to just use http://fortawesome.g...me/get-started/ first method here for pagelines? Updating future versions would just be changing few letters, no need to flush caches when migrating etc.
Posted 27 May 2014 - 08:43 PM
the css url isnt the issue, its the path to the font that has changed. You should ALWAYS click the flush button when you migrate a site. If anything it makes sure everything is working as expected.
Check out this blog post on how to use domain names in local development so you dont have to change urls.
Posted 27 May 2014 - 09:14 PM
I'm using CodeKit so unfortunately I have to change the urls. Fortunately there's an amazing plugin called WP Migrate DB that allows me to do that with such ease that it's no problem at all. I'm also using Git + Beanstalk for version control and deployments.
Pretty much the only thing that's annoying me is the paths to Font Awesome not working after deployment as WP Migrate DB (and this whole workflow) is dependent on the files not including fixed urls, just the database.
I'm just curious on would there be issues if the path to font awesome would be relative to whatever the root url is? Or would there be issues?
Posted 24 September 2014 - 12:42 PM
I still recommend you'd see if solution I recommended would be used in a future version of DMS.
Just go and see how many developers in the DMS shop have their icons broken, very likely because of this. The problem is that the developer who work locally cannot see that the live site is broken because for them the fonts are loading from local urls.
Posted 24 September 2014 - 01:20 PM
Will this slow down the loading of the site? Meaning, is this only for development purposes?
Posted 24 September 2014 - 01:22 PM
Posted 24 September 2014 - 01:41 PM
Thank you very much.
Still I'm wondering wouldn't it be easier just to have a hardcoded url for the font awesome, or even just use:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
and never have to worry about the updares besides just updating the url in new versions of DMS?
Of course there might be stuff I won't understand, but just as a thought.
Edited by ketri, 24 September 2014 - 01:43 PM.
Posted 24 September 2014 - 03:53 PM