2

In continue with Magento 2: How to override Luma Theme Home Page

I'm getting error

Cannot read contents from file "D:/wamp/www/magento2/" Warning!file_get_contents(D:/wamp/www/magento2/): failed to open stream: No such file or directory

enter image description here

As i'm using Magento 2 CE on WAMP Windows 10, it shouldn't be file permission issue.

10
  • Have you checked your entry inside databse tablename with theme? in your theme table contains entry for all themes, Commented Sep 28, 2016 at 8:50
  • Yes in theme table it added my New Theme. Checked Commented Sep 28, 2016 at 8:52
  • Have you checked with theme table entry for your theme have field type with value 0? Commented Sep 28, 2016 at 8:53
  • Yes it has 0 value like all Commented Sep 28, 2016 at 8:55
  • if you switch theme to luma its working? and all other pages are working fine? Commented Sep 28, 2016 at 9:05

1 Answer 1

3

Maybe you have missing web and etc folder in your theme folder.

please add below code in your theme,

you need to copy entire web folder from /vendor/magento/theme-frontend-luma to app/design/frontend/Vendor/Theme/web folder

Also need to copy etc folder from default luma theme to your Vendor/Theme folder and check again

web folder is neccessary to add inside theme.

Now run command php bin/magento setup:upgrade

run deployment command, php bin/magento setup:static-content:deploy

Remove var folder and clear browser cache.

Set Your custom theme from

Content -> Design -> Configuration

2
  • 1
    Surely it shouldn't be necessary to copy the Luma theme folder? Should be sufficient to inherit from Luma theme. I can't quote you chapter and verse at the moment, but I though theme inheritance was one of the advertised features. Commented Nov 3, 2016 at 16:04
  • where is stored etc folder and where need to place Commented Mar 20, 2018 at 10:56

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.