Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub/Static directory is empty #972

Closed
mrugeshrocks opened this issue Jan 14, 2015 · 10 comments
Closed

Pub/Static directory is empty #972

mrugeshrocks opened this issue Jan 14, 2015 · 10 comments
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@mrugeshrocks
Copy link

I did a fresh install it went successful after a lot of tries.

Both front-end and admin wont load CSS/JS/ files are not created in pub/static directory & as one directory _requireJs

Also frontend and adminhtml directories do not exist in pub/static.

@antonkril antonkril added the PS label Jan 14, 2015
@mrugeshrocks
Copy link
Author

For further info, i was installing it with sample data.

@buskamuza
Copy link
Contributor

Is Apache mode_rewrite enabled and its configuration is allowed from .htaccess files of your web-site?

@mrugeshrocks
Copy link
Author

@buskamuza .htaccess was not allowed. I allowed .htacess and magento showed up the theme.

Could you put some light on this behavior of magento?

Thanks for the help. :)

@mazhalai
Copy link
Contributor

More documentation about this behavior here

@buskamuza
Copy link
Contributor

Additionally to the big documentation @mazhalai pointed to, here is how static view files are related to mod_rewrite.

  1. Browser requests a file
  2. It's not found, as it doesn't exist by default
  3. Rewrite rule in pub/static/.htaccess discovers it and redirects to pub/static.php
  4. pub/static.php searches for the requested file using fallback mechanism described in the article mentioned by @mazhalai
  5. If the file is found, it's published somewhere to pub/static/ folder (e.g., pub/static/frontend/Magento/blank/css/file.css)
  6. On the next request, the file already exists, so it's just returned as a static content w/o involving mod_rewrite

This is default behavior (when default application mode is used).
In developer mode the file is not even published to pub/static folder. It goes through pub/static.php entry point every time.
In production mode it's expected that all files are published to pub/static folder, so pub/static.php should not be involved at all. If it is, it just returns 404 error. There is a tool for deploying static view files and it should be used to make production mode work (dev/tools/Magento/Tools/View/deploy.php)

We're thinking how UX can be improved in this area, but right now it works as described above.

@verklov
Copy link
Contributor

verklov commented Jan 22, 2015

@mrugeshrocks, are there other questions remaining that you'd like to ask related to your original question?

@mrugeshrocks
Copy link
Author

Thanks @buskamuza & @mazhalai

With this im closing the issue.

@bucha
Copy link

bucha commented Nov 21, 2015

Just as a side note…
I had to add RewriteBase /pub/static/ when using a VirtualDocumentRoot.

fe-lix- pushed a commit to fe-lix-/magento2 that referenced this issue Apr 29, 2018
MSI-971: Typo in InventoryCatalog Integration test.
@magento-engcom-team
Copy link
Contributor

Hi @mrugeshrocks. Thank you for your report.
The issue has been fixed in magento/graphql-ce#973 by @VitaliyBoyko in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.4 release.

@magento-engcom-team magento-engcom-team added Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Oct 13, 2019
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

7 participants