0

Hello Developer community,

I have been trying for two day to figure out how I can customize my magento template. Recently I have become stuck on being able to pull up my new magento theme in the backend admin panel. I have followed the the dev docs to the tee, at least I think so, but I still cannot figure out what I am doing wrong.

Here are the files

Registration.php:

<?php


\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/shayan/uub',
__DIR__
);

theme.xml:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Magento uub</title>
<parent>boxstore/boxstore_default</parent>
<media>
    <preview_image>media/preview.jpg</preview_image>
</media>

composer.json:

{
   "name": "shayan/theme-frontend-uub",
"description": "N/A",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/theme-frontend-blank": "100.0.*",
    "magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [
        "registration.php"
    ]
}

}

I have already tried

php cache:clear php
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
  • Closing tag of theme is missing in the given code..could u try adding it in theme.xml and give a try – Haritha Mar 23 '18 at 1:37
0

Add or copy from an existing theme.xml to your theme directory app/design/frontend//

Configure it using the following example:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
 <title>New theme</title> <!-- your theme's name -->
 <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
 <media>
     <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
 </media>

If you change the theme title or parent theme information in theme.xml after a theme was already registered, you need to open or reload any Magento Admin page for your changes to be saved in the database.

Reference Link: http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-create.html

| improve this answer | |
0

You have to camel case the first character of vendor name like 'frontend/shayan/uub' it should be 'frontend/Shayan/uub'

| improve this answer | |
0

I too faced with this issue and below is the solution worked for me:

I observed that running:

php bin/magento indexer:reindex design_config_grid

Gave below result:

Design Config Grid index is locked by another reindex process. Skipping.

So to get that fixed i ran:

php bin/magento indexer:reindex design_config_grid

And this fixed the issue.

| improve this answer | |
0

You have to check whether the theme boxstore/boxstore_default appears in your database. If not yet, please add it.

| improve this answer | |

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.