2

I installed a new magento 2 shop and both the front and backend were missing css etc. I ran php bin/magento setup:static-content:deploy and everything looked correct except for the logo and the icon font in the front end. I could change the logo, and the backend was showing the icons no problem. But the front end was not rendering properly:

enter image description here

enter image description here

enter image description here

What am I missing to get these icons showing?

3

I was using English UK as my language.

\pub\static\frontend\Magento\luma\en_US\fonts

had the missing fonts in it. I had to copy them to

\pub\static\frontend\Magento\luma\en_GB\fonts

I see there are a load of extra files in the en_US file, that are not in the en_GB. No idea why this is, but copying the font files into the right place and they work.

when you install on other language let say Romanian or UK English or Spanish, the program do not download all fonts in the correct folder, so for this reason we must put them manual in the language we want .. so we can have :)

  • Hi, the copy to other languages should be done eitherway, in my case the copy (or the symlink creation) was broken due to some virtualbox issues with windows symlink ErrMsg : Cannot create a symlink for "/.../magento/theme-frontend-luma/web/fonts/Luma-Icons.ttf" and place it to "/.../pub/static/frontend/Vendor/default/fr_FR/fonts/Luma-Icons.ttf" Warning!symlink(): Input/output error – medmek Sep 3 '18 at 11:10
1

Run this commands in magento root:

chmod -R 0777 var; chmod -R 0777 pub/static; chmod -R 0777 pub/media; rm -Rf var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/;

This commands set the permissions and remove cache folders. In some cases it is ok to delete the cache folders from /var

Clasic commands for clear and flush cahe is:

php bin/magento cache:clean
php bin/magento cache:flush

And try again

php bin/magento setup:static-content:deploy
  • im using xamp on local server so permissions should not be a problem. I tried all the cache and deploys but it is not showing. All the other media content shows - there is a specific issue with the fonts. I have seen other people with the issue but no answers – Jon Nov 10 '16 at 12:23
  • It's for web permision not pc permision, you have a Windows, click right to folder project -> properties -> uncheck Read Only and try again. If problem is on font, then is not ok declaration source path of font – St3phan Nov 10 '16 at 15:09
  • All that does not help. And I am not sure if your need for permissions is true - devside.net/wamp-server/… – Jon Nov 13 '16 at 14:49
0

Have you guys try to replace

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

to

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

This seems to work for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.