5

I created custom theme based on luma theme.

And my theme contain only 2 files theme.xml registration.php file.

And i configured this theme in the back end.

if i run store front css,js not loading. even if i run static content deploy also my theme not listed in deploying process.

asked May 17, 2016 at 13:14

4 Answers 4

9

You must have add web folder from parent theme into your theme. After add this folder into your theme you have to run command for deploy.

php bin/magento setup:static-content:deploy
answered May 17, 2016 at 13:19
4
  • 1
    entire web folder not required.just i searched .its a bug i think.github.com/magento/magento2/issues/3754 Commented May 17, 2016 at 13:24
  • just add those web folder and try its working Commented May 17, 2016 at 13:25
  • As of today 2.1.7, you need to have a file inside the `web1 folder for the static-content:deploy to recognize your theme. Commented Sep 6, 2017 at 23:52
  • i have web folder inside my theme but its not working for me Commented Jun 12, 2018 at 12:58
4

This is a bug, according to https://github.com/magento/magento2/issues/3754

In order for the child theme to have its static files generated by the setup:static-content:deploy command, there must be at least 1 static file in the /web directory.

If your child theme only has layout update files, you could create a dummy/empty image, css or js file. Therefore, Magento will consider your child theme and deploy the static files for it (in this case copy them over from the parent theme)

answered Apr 11, 2017 at 14:47
0
1

I had this issue for a while as well. I found a correct solution and @Rakesh is pretty right on this part. But the explanation is not complete.

first my theme did not show up. of course i had the have the correct Registration.php and Theme.xml file. After a

php bin/magento setup:upgrade

my theme showed up in the back-end

Then the static content deploy failed with this message

[InvalidArgumentException]
 Vendor/custom_theme argument has invalid value, available themes are: Magento/blank, Magento/luma

I had to the entire directory structure ready

etc
-view.xml
media
-preview.png
registration.php
theme.xml
web
-css
-fonts
-images
-js

But still. then i added the logo.svg to the web/images folder and a less file to the css folder and Boom all worked perfectly now!

answered Nov 3, 2016 at 7:30
0

Please check if your design exist on the server. It happend to me that it was deleted because of certain actions in git.

answered Feb 10, 2021 at 19:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.