Magento2: Must override at least one static content file or custom theme static content won't deploy

Created on 14 Mar 2016  路  25Comments  路  Source: magento/magento2

Steps to reproduce

  1. I created a custom theme with Magento/blank as parent, to override a template.
  2. I did not override any static content. (nothing in the theme's web folder).
  3. I ran bin/magento setup:static-content:deploy

    Expected result

The static content requests would fall back to load from the Magento/blank theme.

Actual result

All of the static content links in pub/static/theme 404'd.

Workaround

I added a logo file to theme/web/images and reran setup:static-content:deploy. This time all the files were generated in pub/static.

Ready for Work

Most helpful comment

Still an issue in 2.1.7... that's two days of my life I won't get back :(

All 25 comments

Hi, @dnadle!

Thank you for reporting this issue.
Internal ticket MAGETWO-52102

The issue is currently in progress.

Same problem in Magento 2.1.

Same problem in Magento 2.0.7

Fixed

This is still an issue in 2.1. Without an image in theme/web/image it ignores the theme.

had this same issue in 2.1. took a while to figure out until I saw the workaround.

Still an issue in 2.0.9. I had to create an empty test.js file in app/design/adminhtml/[Package]/[Theme]/web for the theme to deploy

Why is this closed ? Still an issue in CE 2.1.1

Confirm! Still bug in CE 2.1.2

Yes. I face same issue in Magento 2 CE Version 2.1.2. What is solution?

When creating a new custom theme, if we don't have any assets files under web folder, your theme may be ignored when executing deploy command.

Still a bug in CE 2.1.3.

still a bug CE 2.1.4

This issue still exists in 2.1.5.

Please reopen this!

Issue still exists.
I've had to create a dummy static file (dummy.js) so the child theme wouldn't be ignored by setup:static-content:deploy command

Still exist in 2.1.6

I confirm still present in 2.1.6.
Ok workaround is quite simple, but still an issue :)

Still an issue in 2.1.7... that's two days of my life I won't get back :(

Yeah, same issue on 2.1.7..

Please reopen this, is still an existing issue.

It will be released with 2.2.0 unless someone will create a backport for 2.1.x.

I have experienced this issue in 2.1.8 as well.

Internal ticket to track issue progress: MAGETWO-72253

Was this page helpful?
0 / 5 - 0 ratings