- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Thanks.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: New Unable to Load Theme by Theme ID Issue
Hello,
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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