(v 3.3) mobile menu stopped working properly.

Created on 3 October 2023, about 1 year ago
Updated 27 March 2024, 8 months ago

Drupal 10.1.4
php 8.2
Droopler 3.3.0-RC2

After updating from D9 and Droopler 3.2.0-RC2, the mobile menu stopped working properly.
Additionally, errors appear in the console:
Uncaught TypeError: n.once is not a function
and other.
(included in .txt file)

πŸ› Bug report
Status

Active

Version

3.3

Component

Code

Created by

πŸ‡΅πŸ‡±Poland pingwin_cracow

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

Merge Requests

Comments & Activities

  • Issue created by @pingwin_cracow
  • πŸ‡΅πŸ‡±Poland pingwin_cracow

    Additional information:
    a)
    D9.5.11
    php 8.2
    Droopler 3.2.0-rc1
    Drupal Mega Menu 8.x-1.16 (or Drupal Mega Menu 8.x-1.14) + patch
    This menu setup works fine

    After update:
    b)
    D10.1.4
    php 8.2
    Droopler 3.3.0-rc1
    Drupal Mega Menu 8.x-1.16 (or Drupal Mega Menu 8.x-1.14) + patch
    Unfortunately, it either doesn't work at all or develops and disappears.

  • πŸ‡§πŸ‡ͺBelgium xaa Brussels

    same issue here (droopler 3.2.0)

  • πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA

    Same here.

    This seems to be related to " Remove jQuery dependency from the once feature β†’ ".

    A patch would be great.

  • πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA
  • πŸ‡§πŸ‡ͺBelgium xaa Brussels

    in my local I've fixed the issue by recompiling theme (in web/profiles & web/themes/custom). But the issue stills occurs after deployment.

    In my droopler custom theme, I saw some calls from web/profiles/contrib/droopler/custom/themes/droopler_theme/js files.
    The .gitignore contains !/web/profiles/custom but there is nothing there.

    As a quick workaround I've added a line !/web/profiles/contrib/droopler to include the web/profiles/contrib/droopler files in git then deploy is ok

    Hope it helps

  • Merge request !5Removed deprecated use of jQuery.once β†’ (Open) created by jcmartinez
  • πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA

    I have created a pull request with a fix.

    In the meantime, you can use the commit as a patch with composer by adding the following line to the patches section of your composer.json.

                "droptica/droopler": {
                    "Remove JQuery.Once": "https://git.drupalcode.org/project/droopler/-/merge_requests/5.diff"
                }
    

    Then apply the patch:

    composer update droptica/droopler
    

    After this, it may be useful to recompile your base theme:

    cd web/profiles/contrib/droopler/themes/custom/droopler_theme
    npm install -g npm
    npm install gulp
    gulp compile
    drush cr
    
  • πŸ‡ΊπŸ‡ΈUnited States jcmartinez Raleigh, NC, USA

    Note that every time you patch a module or a theme, the entire content is rewritten by composer. Therefore, after patching, you have to recompile the base theme.

    Depending on how your CSS is committed into the repository, it may be possible that the new JS and CSS code generated during the compilation will not be added to the repository. It is up to you how you bring the new JS and CSS code generated inside the base theme into your repository and, ultimately, into your live website. If you don't bring this code to your live website, you'll see the menu working locally while broken on production.

Production build 0.71.5 2024