Main navigation toggle is not working.

Created on 1 September 2023, about 2 years ago

Problem/Motivation

When I click on the hamburger menu it is not responding. No event occurs.

Steps to reproduce

  1. Install the theme
  2. Enable it
  3. Click on the hamburger menu

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @shweta__sharma
  • 🇮🇳India swatidhurandhar

    @shweta__sharma I tried to replicate issue in D9.5 but hamburger toggle works fine there. I have attached video for reference.
    Please add detailed steps to reproduce this.

  • Status changed to Needs review about 2 years ago
  • Hi @swatidhurandhar,
    I am using Drupal 10, attaching a reference video - https://www.loom.com/share/6e974440748745678d2c48efb27cfa4d toggle not working at my end.

  • 🇵🇭Philippines clarkssquared

    Hi @shweta__sharma,

    I also tried to duplicate the issue in D10, but the hamburger menu is working in my end.

    Please look at the file I attached for your reference.

    Thank you

  • Console:

    Uncaught TypeError: can't access property "closeMessage", Drupal.january is undefined
    /themes/january_theme/js/messages.js?v=10.2.4:30
    /themes/january_theme/js/messages.js?v=10.2.4:31
    messages.js:30:3

    I am not very good in JS, so my decision)) \january_theme\js\messages.js

      Drupal.behaviors.messages = {
        attach: function attach(context) {
          once('messages', '[data-drupal-selector="messages"]', context).forEach(closeMessage);
        }
      };
      //Drupal.january.closeMessage = closeMessage; /*line.30*/
    })(Drupal, once);
  • Tested this issue is still reproducible with below versions:

    Drupal Version 10.3
    Theme version 1.0.x-dev

    Steps to reproduce

    1. Install the theme
    2. Enable it
    3. Click on the hamburger menu
    4. Make sure to enable JS aggregation , this issue happens only when JS aggregation is enabled admin/config/development/performance

    Once aggregation is enabled when you click on hamburger menu error occurs in Console, attaching screenshot.

    Avoiding adding issue screenshot as it is already added in https://www.drupal.org/project/january_theme/issues/3384793#comment-1521... 🐛 Main navigation toggle is not working. Active

Production build 0.71.5 2024