3

I installed Magento v2.2.4 with sample data on my local using xampp. I downloaded the source from magento.com/tech-resources/download as the user guide instructed.

After finishing the installation, I found this error, and couldn't solve it:

Icons and favicons don't appear and styles are broken, also requirejs doesn't work.

Icons and favicons don't appear and styles broke, also requirejs doesn't work

Please, help me. I am new to Magento 2 and couldn't know how to fix it.

  • It seems that no images are shown...?! You could try to replace all occurrences of "Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink" in the file app/etc/di.xml with "Magento\Framework\App\View\Asset\MaterializationStrategy\Copy" – where Aug 16 '18 at 1:40
  • Are you using XAMPP for Windows or for Linux? – where Aug 16 '18 at 1:42
  • I am using xampp for Windows. – Vladimir T. Aug 16 '18 at 1:48
  • Finally, I solved the problem. It really works well. Thank you very much. – Vladimir T. Aug 16 '18 at 2:30
  • Great - was it just the "Copy" instead of "Symlink" thing? – where Aug 16 '18 at 2:56
1

If no images are shown after the installation of Magento, replacing all occurrences of

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

in the file app/etc/di.xml with

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

... should help. It tells Magento that it should copy files instead of creating symlinks. This seems to be necessary on Windows machines, because Windows does not support symlinks.

0

Log in to your server using SSH, then deploy the static content by applying this command on Magento root

php bin/magento setup:static-content:deploy

more details about deploying the static content in this link

https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.html

  • Thank you very much for your answer, Mr. Wisam. But sadly I don't know how to log in to my server using SSH. I installed magento on my local server using xampp. How can I do that? – Vladimir T. Aug 16 '18 at 1:39
  • In that case, you could run that command via command line in your local magento root directory. – where Aug 16 '18 at 1:44
  • Without logging in using SSH? – Vladimir T. Aug 16 '18 at 1:48
  • in your local machine you can login using "Command Prompt", then go to your magento root folder then you can do deploy static-content – WISAM HAKIM Aug 16 '18 at 14:07
0

It is not an error. You have just installed Magento so the thing is that your static content is not generated properly. So to solve this issue run below commands in cmd:

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

php bin/magento indexer:reindex

php bin/magento cache:clean

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.