Skip to main content
Edit file location for newer Magento versions
Source Link
Cladiuss
  • 1.3k
  • 1
  • 14
  • 27

This happened to me when I made a custom theme.

I created a theme.js file in app/design/fontend/<CUSTOM_THEME>/default/web/js/ to use some library I added.

But I forgot to copy the code that where already there in the theme.js of the blank theme (/vendor/magento/theme-frontend-blank/web/js/theme.js).

Here is the JavaScript line which clones the links to the mobile menu :

    $('.panel.header > .header.links').clone().appendTo('#store\\.links');

Check if you have your own theme.js that could overwrite the default one.

If it doesn't work, check the mobile menu with the luma theme, and blank theme to be sure it works with default themes.

Edit for Magento 2.2+ :

Since Magento 2.2.0 (see commit), the theme.js file has been moved to /vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js.

This happened to me when I made a custom theme.

I created a theme.js file in app/design/fontend/<CUSTOM_THEME>/default/web/js/ to use some library I added.

But I forgot to copy the code that where already there in the theme.js of the blank theme (/vendor/magento/theme-frontend-blank/web/js/theme.js).

Here is the JavaScript line which clones the links to the mobile menu :

    $('.panel.header > .header.links').clone().appendTo('#store\\.links');

Check if you have your own theme.js that could overwrite the default one.

If it doesn't work, check the mobile menu with the luma theme, and blank theme to be sure it works with default themes.

This happened to me when I made a custom theme.

I created a theme.js file in app/design/fontend/<CUSTOM_THEME>/default/web/js/ to use some library I added.

But I forgot to copy the code that where already there in the theme.js of the blank theme (/vendor/magento/theme-frontend-blank/web/js/theme.js).

Here is the JavaScript line which clones the links to the mobile menu :

    $('.panel.header > .header.links').clone().appendTo('#store\\.links');

Check if you have your own theme.js that could overwrite the default one.

If it doesn't work, check the mobile menu with the luma theme, and blank theme to be sure it works with default themes.

Edit for Magento 2.2+ :

Since Magento 2.2.0 (see commit), the theme.js file has been moved to /vendor/magento/theme-frontend-blank/Magento_Theme/web/js/theme.js.

Source Link
Cladiuss
  • 1.3k
  • 1
  • 14
  • 27

This happened to me when I made a custom theme.

I created a theme.js file in app/design/fontend/<CUSTOM_THEME>/default/web/js/ to use some library I added.

But I forgot to copy the code that where already there in the theme.js of the blank theme (/vendor/magento/theme-frontend-blank/web/js/theme.js).

Here is the JavaScript line which clones the links to the mobile menu :

    $('.panel.header > .header.links').clone().appendTo('#store\\.links');

Check if you have your own theme.js that could overwrite the default one.

If it doesn't work, check the mobile menu with the luma theme, and blank theme to be sure it works with default themes.