Drupal 11 ships with jQuery 4.0.0, which removed the `$.type()` method.
Slick Carousel 1.8.1 (loaded via CDN in pdf_slideshow.libraries.yml) calls
`$.type()` internally in `registerBreakpoints()`, causing an uncaught TypeError
on page load:
Uncaught TypeError: i.type is not a function
e.registerBreakpoints @ slick.min.js:1
The AJAX call to `/slideshow/render/...` succeeds and images are generated,
but the carousel never initializes. All pages are rendered stacked vertically
instead of as a slideshow.
Steps to reproduce:
- Install pdf_slideshow on Drupal 11
- Create a PDF media entity and reference it from a node
- Apply the PDF Slideshow formatter with nb_pages > 1
- Visit the node page
Expected: a working slideshow with navigation
Actual: images stacked vertically, JS error in console
Environment:
- Drupal 11.x
- jQuery 4.0.0 (shipped with Drupal 11)
- Slick Carousel 1.8.1
It has been reported to Slick already and fix has been merged, however no new release has been made since 9y (https://github.com/kenwheeler/slick/issues/4316). Another Drupal module did a fix, not sure the same is applicable here (https://www.drupal.org/project/slick/issues/3467129)
Issue fork pdf_slideshow-3606232
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
vbouchethttps://git.drupalcode.org/project/pdf_slideshow/-/merge_requests/1
Comment #4
vbouchet