0

I am not getting how the contents of my account links are not displaying when viewed as mobile format. You can see in the image there is no links under account tab. enter image description here

Here is my overridden default.xml:

<?xml version="1.0"?>
<page layout="3columns"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="header.container">

        <container name="header.panel.wrapper.mobile" htmlClass="panel wrapper" htmlTag="div" before="header.panel.wrapper">

            <container name="header.panel.wrapper.mobile.container" htmlClass="container" htmlTag="div">

                <block class="Magento\Cms\Block\Block" name="headline-item">
                    <arguments>
                        <argument name="block_id" xsi:type="string">header-headline</argument>
                    </arguments>
                </block>
                <block class="Magento\Framework\View\Element\Html\Links" name="header.links.desktop" after="headline-item">
                    <arguments>
                        <argument name="css_class" xsi:type="string">header links desktop</argument>
                    </arguments>
                    <block class="Magento\Customer\Block\Account\Customer" name="customer.desktop" template="Magento_Customer::account/customer.phtml" before="-">
                        <block class="Magento\Customer\Block\Account\Navigation" name="top.links.desktop">
                            <block class="Magento\Customer\Block\Account\Link" name="my-account-link.desktop">
                                <arguments>
                                    <argument name="label" xsi:type="string" translate="true">My Account</argument>
                                    <argument name="sortOrder" xsi:type="number">110</argument>
                                </arguments>
                            </block>
                            <block class="Magento\Wishlist\Block\Link" name="wish-list-link.desktop" after="my-account-link">
                                <arguments>
                                    <argument name="sortOrder" xsi:type="number">60</argument>
                                </arguments>
                            </block>
                        </block>
                    </block>
                    <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login.desktop" template="Magento_Customer::account/link/authorization.phtml">
                        <arguments>
                            <argument name="sortOrder" xsi:type="number">10</argument>
                        </arguments>
                    </block>
                    <block class="Magento\Customer\Block\Account\RegisterLink" name="register-link.desktop" template="Magento_Customer::account/link/register.phtml">>
                        <arguments>
                            <argument name="label" xsi:type="string" translate="true">Sign Up</argument>
                        </arguments>
                    </block>
                </block>
            </container>

        </container>

        <container name="header.panel.wrapper.menu" htmlClass="wrapper-header-menu" htmlTag="div" after="-">
            <container name="header.panel.wrapper.menu.container" htmlClass="container" htmlTag="div">
                <block class="Magento\Framework\View\Element\Template" name="header.mobile" template="Magento_Theme::header/links/menu.phtml" />
            </container>
        </container>


    </referenceContainer>


    <referenceBlock remove="true" name="skip_to_content" />

    <move element="top.search" destination="header.panel.wrapper.menu.container" after="-" />


    <referenceBlock name="store.menu">
        <arguments>
            <argument name="block_id" xsi:type="string">store-menu</argument>
        </arguments>
        <block class="Magento\Cms\Block\Block" name="side__navigation">
            <arguments>
                <argument name="block_id" xsi:type="string">side__navigation</argument>
            </arguments>
        </block>
    </referenceBlock>

    <referenceBlock name="store.links">
        <arguments>
            <argument name="block_id" xsi:type="string">store-links</argument>
        </arguments>
    </referenceBlock>

    <referenceBlock name="store.settings">
        <arguments>
            <argument name="block_id" xsi:type="string">store-settings</argument>
        </arguments>
    </referenceBlock>



    <referenceContainer name="page.wrapper">
        <container name="page.before.footer">
            <block class="Magento\Cms\Block\Block" name="footer-exclude-tax" after="page.content">
                <arguments>
                    <argument name="block_id" xsi:type="string">footer-exclude-tax</argument>
                </arguments>
            </block>
        </container>
    </referenceContainer>



    <referenceBlock name="footer_links" remove="true"/>
    <referenceContainer name="footer">

        <block class="Magento\Cms\Block\Block" name="footer-shopping_guide">
            <arguments>
                <argument name="block_id" xsi:type="string">footer-shopping-guide</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="footer-shoplist">
            <arguments>
                <argument name="block_id" xsi:type="string">footer-shoplist</argument>
            </arguments>
        </block>
        <block class="Magento\Cms\Block\Block" name="footer-sns">
            <arguments>
                <argument name="block_id" xsi:type="string">footer-sns-icons</argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceBlock name="form.subscribe" remove="true"/>

</body>

I also followed this link as well: Magento 2 : Missing Account Links in Mobile Menu

but not working in my case. Does anyone has faced same type of errors and later solved? Please help if you had solved this one. Thanks in advance.

  • Please check if "header.links.desktop" is removed from XML – Sumit Aug 30 at 9:00
  • No, header.links.desktop has not been removed, I had not added the line to remove header.links.desktop. It is strange how the account links are not displaying... – Suman Maharjan Aug 30 at 9:13
  • Have you tried Luma's default.xml file in place of your default.xml file to check if the issue is with this file or any other module confliction? – Sumit Aug 30 at 9:17
  • Yeah, already tried that one as well. But if I changed to default theme as Luma not my custom theme as that case it is showing the account menu, might that be the problem with js or any conflict with css.. – Suman Maharjan Aug 30 at 9:25
  • Yes, so this might be an issue of any customization in your theme. – Sumit Aug 30 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.