cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Luma theme magento 2 missing Customer sign in

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Custom Luma theme magento 2 missing Customer sign in

I have "create account" but I am missing "Sign in" here is my custom default XML - I am getting system error report, "main.CRITICAL: Broken reference: No element found with ID 'customer. not sure its related. any help is appreciated - Thanks 

 

<referenceBlock name="footer_links" remove="true" />
<referenceContainer name="header.panel">
    <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
        <arguments>
            <argument name="css_class" xsi:type="string">header links</argument>
        </arguments>
    </block>
</referenceContainer>
<referenceBlock name="logo">
    <arguments>
        <argument name="logo_img_width" xsi:type="number">148</argument>
        <argument name="logo_img_height" xsi:type="number">43</argument>
    </arguments>
</referenceBlock>
<referenceContainer name="footer">
    <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="switch/stores.phtml"/>
</referenceContainer>
<referenceBlock name="report.bugs" remove="true"/>
<move element="copyright" destination="before.body.end"/>
1 REPLY 1

Re: Custom Luma theme magento 2 missing Customer sign in

Hello  @nht48823 

Create vendor/magento/theme-frontend-luma/Magento_Customer/layout/default.xml

 <referenceBlock name="header.links">
            <block class="Magento\Customer\Block\Account\Customer" name="customer" template="Magento_Customer::account/customer.phtml" before="-"/>
            <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="Magento_Customer::account/link/authorization.phtml">
                <arguments>
                    <argument name="sortOrder" xsi:type="number">10</argument>
                </arguments>
            </block>
        </referenceBlock>

The above code will be helpful to add the sign-in link in the file in Magento 2.

 

Hope it helps.

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution"