I have a custom Luma theme I use for my store, for whatever reason sign in link is missing but I do have Create an Account on the header - where should I start looking to resolve this issue. I see system error report, "main.CRITICAL: Broken reference: No element found with ID 'customer'

I am guessing its related to missing login


here my custom theme XML

<?xml version="1.0"?>

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

  • So if you have a custom theme.... how could anyone know about it ? we are not mind readers Commented Jan 20, 2020 at 20:06
  • like I mention I HAVE A CUSTOM LUMA THEME. if you are not going to help maybe you should not answer this...
    – roger
    Commented Jan 20, 2020 at 22:31
  • i will give you a hint, look in the .xml files but what files it could be... like it can be anywhere default.xml files prolly it can also be in a template .phtml or a javascript could be rewritten ... there are just many possibilites :P Commented Jan 20, 2020 at 22:39

1 Answer 1


The first thing I would do is view source on the page and make sure that the link is actually missing, vs. hidden with CSS, obscured behind some other element etc. Seems unlikely in this case, but it is the fastest thing to check.

By default in Luma, the "Sign In" link is defined in vendor/magento/theme-frontend-luma/Magento_Customer/layout/default.xml in the authorization-link-login block:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <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">
                    <argument name="sortOrder" xsi:type="number">10</argument>
        <move element="header" destination="header.links" before="-"/>
        <move element="register-link" destination="header.links"/>
        <move element="top.links" destination="customer"/>
        <move element="authorization-link" destination="top.links" after="-"/>

I found that deleting the header.links section (and clearing the cache) caused the "Sign In" link to disappear and an error to be logged for the missing "customer" block:

main.WARNING: Broken reference: The element with the "customer" ID wasn't found. Verify the ID and try again.

(Not the exact same error though!)

So, I would ensure that this block is still represented in your default layout file, or any custom overrides for your theme (or any extensions). Then examine whatever template is configured for the block.

The default block file is vendor/magento/module-customer/Block/Account/AuthorizationLink.php

The default template file is vendor/magento/module-customer/view/frontend/templates/account/link/authorization.phtml

There isn't really a lot going on in either, so it seems most likely that the block is not being included at all.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.