cancel
Showing results for 
Search instead for 
Did you mean: 

css and js files not loading on a magento2 site that was initially working.please help

css and js files not loading on a magento2 site that was initially working.please help

Screenshot from 2023-04-26 09-19-13.png

2 REPLIES 2

Re: css and js files not loading on a magento2 site that was initially working.please help

Hello @karimilucc7d36 

 

I am not able to see the screenshot, as it may not be approved yet.

But you can try to check below points

 

  1. Check the file paths: Ensure that the file paths for your CSS and JS files are correct. Make sure that the file names and directory structure match the references in your HTML or PHP files.

  2. Check file permissions: Make sure that the file permissions for your CSS and JS files are set correctly. In most cases, the files should have a permission of 644, and the directories should have a permission of 755.

  3. Clear cache: Clear the cache of your Magento 2 site by navigating to System > Cache Management in the admin panel and clicking "Flush Magento Cache" button.

  4. Check for errors in console: Check the console log in your web browser's developer tools for any errors related to the loading of CSS and JS files.

  5. Check for conflicts with third-party extensions: Sometimes, third-party extensions can conflict with the loading of CSS and JS files. Try disabling any recently installed extensions to see if the issue resolves.

  6. Check your .htaccess file: Make sure that the .htaccess file in your Magento root directory is not blocking access to your CSS and JS files.

If none of these steps resolve the issue, you may need to consult with a Magento developer or technical support team for further assistance.

 

 

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: css and js files not loading on a magento2 site that was initially working.please help

The issue may be caused by a server error. Check your server logs to see stumbleguy, if there are any errors or warnings related to the loading of CSS and JS files.