cancel
Showing results for 
Search instead for 
Did you mean: 

New Unable to Load Theme by Theme ID Issue

SOLVED

New Unable to Load Theme by Theme ID Issue

Running open 2.3.4...

 

Developing new theme from scratch. So far with only:

  • composer.json
    • {
          "name": "Hopeful/Blazer",
          "description": "Primary Theme for new site",
          "require": {
              "php": "~7.1.3||~7.2.0||~7.3.0",
              "Hopeful/Blazer": "100.0.*",
              "magento/framework": "*",
              "magento/theme-frontend-blank": "*"
          },
          "type": "magento2-theme",
          "version": "100.0.1",
          "license": [
              "OSL-3.0",
              "AFL-3.0"
          ],
          "autoload": {
              "files": [
                  "registration.php"
              ]
          }
      }
  • registration.php
    • <?php
      /**
       * Copyright © 2020 Hopeful. All rights reserved.
       */
      \Magento\Framework\Component\ComponentRegistrar::register(
          \Magento\Framework\Component\ComponentRegistrar::THEME,
        'frontend/Hopeful/Blazer',
          __DIR__
      );
  • theme.xml
    • <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
      <title>Hopeful Blazer</title>
      <parent>Magento/Blank</parent>
      <media>
      <preview_image>media/preview.jpg</preview_image>
      </media>
      </theme>
  • media/preview.jpg

I get "Unable to load theme by specified key: 'Hopeful/Blazer'.....

 

Directory structure:

app/design/Hopeful/blazer/

 

I can't seem to figure this one out and it should be simple - there's nothing here yet... Or is there something missing that should be?

 

I can't capture the error in red as it disappears quickly on my SSH, but here's the output after I run 

rm -rf /pub/static/*
rm -rf /var/view_preprocessed/*
php bin/magento setup:static-content:deploy -f

Screen Shot 2020-03-22 at 10.06.34 AM.png

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: New Unable to Load Theme by Theme ID Issue

Hello @SJ_Med 

 

if help you then mark as solution

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

5 REPLIES 5

Re: New Unable to Load Theme by Theme ID Issue

Picture/jpg didn't work.... here's the output:

 

Deploy using quick strategy
frontend/Magento/blank/en_US            2433/2433           ============================ 100%   1 sec               
frontend/Magento/blank/en_US            2433/2433           ============================ 100%   1 sec               
adminhtml/Magento/backend/en_US         2605/2605           ============================ 100%   1 sec               
frontend/Hopeful/Blazer/en_US           2347/2347           ============================ 100%   2 secs              
frontend/Magento/luma/en_US             2450/2450           ============================ 100%   1 sec

Execution time: 9.1330738067627

Re: New Unable to Load Theme by Theme ID Issue

One addition:

When I run query like: select * from core_config_data  where path like '%theme%', there is no data returned. i.e. I have no rows in my core_config_data table that have anything like theme in them. Perhaps this is part of the issue. I've been running the site so far with Luma theme.

 

This is my first attempt at theme development, and the site has been fine with Luma as it's base up to this point. Obviously, Luma works for basics and development, but as we get ready to go live, a more specific look is needed, and that's where I'm now at.

 

Thanks again.

Re: New Unable to Load Theme by Theme ID Issue

Hello,

 

@SJ_Med 

 

you miss one step setup:upgrade after add theme files.

 

If works then mark as solution

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: New Unable to Load Theme by Theme ID Issue

Wow - do I feel stupid - thought I'd done this, but obviously not.

 

Thank you!

Re: New Unable to Load Theme by Theme ID Issue

Hello @SJ_Med 

 

if help you then mark as solution

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer