0

I have issue in cart page of my website . Currently home page and product pages are loading correctly but the cart page have issue Css and js fies in the cart page is not working

enter image description here

Please help to solve this . I have seen this question Magento 2 StyleSheet not loading

But I am not sure i can apply that solution . Please check .

I have tried sudo php bin/magento setup:static-content:deploy ,but still the cart page is same

3
  • Please fix your question and like add a valid screenshot of your working homepage and not working cart page, because right now your question is a mess, you telling us that your homepage is working while your provided a screenshot with broken homepage Commented May 17, 2020 at 12:12
  • how you understand its screenshot of home page ? Home page is working fine and issue is with cart page only . Commented May 17, 2020 at 12:25
  • Please add a screenshot from js console (there should be errors of not loading css files), need to verify if the reason is that the permission are broken or mb somebody rewritten the layout and removed the style files, there are lot of possibilities why this can happen, even exception could trigger it Commented May 17, 2020 at 12:37

2 Answers 2

1

Make sure you have not deleted htaccss in pub/Static

4
  • Its not deleted . Only cart page have issue . Home page and product pages are working Commented May 17, 2020 at 11:52
  • 1
    Your screenshot is showing homepage I think Commented May 17, 2020 at 11:54
  • it is a sample screenshot only Commented May 17, 2020 at 12:05
  • make sure the pages doesn't throw any exceptions ;) Commented May 17, 2020 at 12:05
0

Run CLI Commands

sudo rm -rf var/*
sudo rm -rf pub/static/frontend/*
sudo rm -rf generated/*

sudo php bin/magento setup:upgrade
Sudo php bin/magento setup:di:compile
Sudo php bin/magento indexer:reindex
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento ca:cl
sudo php bin/magento ca:fl
3
  • hi friend, please tell what will happen if i run this command , i have to run only sudo rm -rf var/* ? Commented May 17, 2020 at 11:17
  • Rm -rf delete the files and folders recursively Commented May 17, 2020 at 11:51
  • @Devidas, please do not advice 777! please also add when setup:upgrade, compile require Commented May 17, 2020 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.