2

I created custom theme ( having only theme.xml,regisration.php file and medial/preview.jpg ).

Logged in to admin panel and went to Conetnt->Design->Configurations so i could change the theme to my custom theme. but it shwoing me loadder file and no recored is showing. So i flushed the cache and now my frontend is not loading. Admin is working fine but theme sections is also not working.

I am working in default mode and my magento version is 2.2.3. Any help will be highly appreciated.

  • did you check if there is any exception / error in var/log folder ? – Naveed Asim Sep 30 '18 at 12:37
1

First of you should check if your code is valid, and there is not any php , xml typo error.

Best approach is copy theme.xml, registartion.php file from vendor/magento/theme-luma-frontend folder and add these in your theme. ( you can delete part from theme.xml file if you have not any media/preview.jpg file.

If your theme is fine and there is not any code / typo error. Then go to your magento2 database and find table named theme (Theme table). Delete your custom theme record where theme_path = 'YourPackage/themename'

After that flush cache and load the site , hope it will be working.

( I had faced similar issue and in my case i had added custom theme and right after that flushed cache and changed deploy:mode to developer and it had crashed the site. Still trying to understand why did that happened)

  • Thanks for the answer, Yes I had copied files from default luma theme. But I havn't tried theme table. I will check and update you. – Arslan Hashim Sep 30 '18 at 13:25
  • It worked.!! deleting my theme record worked for me. deleted the record, re-index and then flushed cache. Thanks – Arslan Hashim Sep 30 '18 at 13:55

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.