cancel
Showing results for 
Search instead for 
Did you mean: 

Flush JS/CSS and Static Files cache removes css files form app folder

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Flush JS/CSS and Static Files cache removes css files form app folder

I'm experiencing a really strange issue:

 

when i flush js/css and static files cache, all css files inside the app folder are deleted:

/public_html/app/design/frontend/vendor/theme/web/css

 

Schermata 2018-04-25 alle 14.23.44.jpg

Because of this, pub/static folder is updated without the needed css files and the front end is broken.

 

Schermata 2018-04-23 alle 23.59.41.jpg

 

i have absolutely no clue on what is causing this and how to fix it, everything worked normally for more than a month.

thanks in advance for helping me

 

5 REPLIES 5

Re: Flush JS/CSS and Static Files cache removes css files form app folder

Hi @dianreytan,

 

Is your store on developer or production mode?

Also, I've saw your root directory point to the magento root and should be path/to/magento/pub.

If you are running on production mode, can you try to regenerate the static assets with:

 

bin/magento setup:static-content:deploy

You can see more about this topic here: https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-static-view.html

Re: Flush JS/CSS and Static Files cache removes css files form app folder

@dianreytan where you able to solve this issue? if yes, how did you solve it. i am experiencing the same issue.

 

Thanks in advance

Re: Flush JS/CSS and Static Files cache removes css files form app folder

Hi @michael_oluwaseyi,

 

Can you sahre a public URL?
Did you get 404 errors on static assets?

Re: Flush JS/CSS and Static Files cache removes css files form app folder

@Damian Culotta Thanks for your reply, i have solved the issue.. luckily for me i had a back up file of the custom CSS file stored on my computer so i just uploaded it back to the root directory..

 HOw can i change my root directory to the /pub directory as you have said.

 

Thanks in advance.

Re: Flush JS/CSS and Static Files cache removes css files form app folder

yes all assets get 404 error