Affix missing jquery.once dependency

Created on 3 May 2022, over 2 years ago
Updated 15 June 2023, over 1 year ago

Problem/Motivation

Using a standard composer installed 5.5.4 and affix.js for a top nav bar, I get

Uncaught TypeError: $(...).once is not a function
    attach https://my.domain.com/themes/contrib/bootstrap_barrio/js/affix.js?v=9.2.18:31

Steps to reproduce

Just install with composer and set the "affix" class in a nav element.

Proposed resolution

If I add the dependency to the affix paragraph in bootstrap_barrio.libraries.yml like so

affix:
  version: VERSION
  js:
    js/affix.js: {}
  css:
    component:
      css/components/affix.css: {}
  dependencies:
    - core/jquery.once

it works as expected.

This is somewhat strange, as the "global-styling" paragraph contains the exact same dependency.

Is this some kind of misconfiguration on my side? The theme is untouched/no modifications are made on my side.

Thanks a lot for your module, much appreciated!

πŸ› Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

πŸ‡¦πŸ‡ΉAustria tgoeg

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024