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.

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

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

  • 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. – gwideman Nov 3 '16 at 16:04
  • where is stored etc folder and where need to place – zus Mar 20 '18 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.