0

I am trying to change logo from Dashboard and Admin login page .Of course I tried all solution from stack overflow . but I am getting the below Error :

error"Exception #0 (LogicException): Unable to load theme by specified key: 'Adminlogo/Changelogo'"

Step1:app/code/Adminlogo/Changelogo/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Theme\Model\View\Design">
        <arguments>
            <argument name="themes" xsi:type="array">
                <item name="adminhtml" xsi:type="string">Adminlogo/Changelogo</item>
            </argument>
        </arguments>
    </type>
</config>

step-2:app/code/Adminlogo/Changelogo/etc/module.xml

 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
     <module name="Adminlogo_Changelogo" setup_version="1.0.0">
         <sequence>
             <module name="Magento_Theme"/>
         </sequence>
     </module>
 </config>

step3:app/code/Adminlogo/Changelogo/registartion.php

    <?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        'Adminlogo_Changelogo',
        __DIR__
    );
    ?>

step4:app/design/adminhtml/mythem/logotheme/registration.php

    <?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::THEME,
        'adminhtml/mythme/logotheme',
        __DIR__
    );


    ?>

step-5:app/design/adminhtml/mythem/logotheme/theme.xml

    <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
        <title>astrokapoor astrology</title>
        <parent>Magento/backend</parent>
    </theme>

step6:design/adminhtml/mythem/logotheme/Magento_Backend/layout/admin_login.xml

        <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-login" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
            <update handle="styles" />
            <body>
                <referenceBlock name="logo">
                    <arguments>
                        <argument name="logo_image_src" xsi:type="string">images/my_logo.png</argument>
                    </arguments>
                </referenceBlock>
            </body>
        </page>

step7:design/adminhtml/mythem/logotheme/Magento_Backend/layout/default.xml

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="header">
                <referenceBlock name="logo">
                    <arguments>
                        <argument name="logo_img_width" xsi:type="number">300</argument> 
                        <argument name="logo_img_height" xsi:type="number">300</argument>
                        <argument name="show_part" xsi:type="string">logo</argument>
                        <argument name="edition" translate="true" xsi:type="string">Community Edition</argument>
                        <argument name="logo_image_src" xsi:type="string">images/astrokapoor_logo.png</argument>
                    </arguments>
                </referenceBlock>
            </referenceContainer>
        </body>
    </page>
0

Please follow below URL

How to change admin Logo & Backend Logo in M2

2
  • MR.R DNATH@Thanks But I have done this .with magento stack-exchange prvious answere Jun 18 '18 at 10:43
  • okay, great.........
    – MR.R DNATH
    Jun 18 '18 at 11:05

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.