Upgrade to 4.1.0 breaks collapsiblock

Created on 23 October 2023, 8 months ago
Updated 19 November 2023, 7 months ago

Using 4.0.0 in Drupal 9 works fine. After upgrade to 4.1.0, collapsiblock fails to work and console throws the following errors:

The resource from “[site]/libraries/slide-element/dist/index.umd.js?v=2.3.1” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Uncaught ReferenceError: SlideElement is not defined
    attach collapsiblock.min.js:57

This is the single issue that's holding up a Drupal 10 launch - any suggestions greatly appreciated!

UPDATE: OK - solved. Perhaps this is because I manually created /libraries/slide-element/inde.umd.js as per the module page:

Right click and save this link in your web root as /libraries/slide-element/inde.umd.js.

(Note the typo - it's supposed to be index.umd.js.)

After patching, fixing the filename and directory structure to be /libraries/slide-element/dist/index.umd.js did the trick.

Perhaps this will help somebody else... thanks!

💬 Support request
Status

Fixed

Version

4.0

Component

Code

Created by

🇺🇸United States bcobin

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

Merge Requests

Comments & Activities

  • Issue created by @bcobin
  • 🇺🇸United States bcobin
  • Status changed to Needs review 8 months ago
  • 🇦🇺Australia darvanen Sydney, Australia

    Hey thanks very much for pointing out this issue with the module page! I've added the missing character.

  • First commit to issue fork.
  • Assigned to ressa
  • Status changed to Needs work 8 months ago
  • 🇩🇰Denmark ressa Copenhagen

    Thanks @bcobin! I was suddenly seeing requests for unpkg.com in uBlock Origin, and Collapsiblock stopped working ...

    I downloaded the script with this, and blocks open and collapse again:

    curl --create-dirs -o web//libraries/slide-element/index.umd.js https://unpkg.com/slide-element@2.3.1/dist/index.umd.js
    
  • Merge request !18Fix missing x in inde.umd.js → (Merged) created by ressa
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 8
    last update 8 months ago
    14 pass
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • 🇩🇰Denmark ressa Copenhagen

    Here's a patch. Also, perhaps the default branch on Gitlab can be updated to 4.x?

  • 🇩🇰Denmark ressa Copenhagen

    Thanks for updating the default branch @darvanen, and leaving a comment in 📌 Typo in readme Postponed: needs info . There are so many projects, where the Gitlab default branch is an old one.

    Somebody should write a script which compares the default/latest release here and on Gitlab, and sends a friendly mail to the maintainer: "Are you sure you want the Gitlab default branch to stay at 1.x, now that 2.x is the official release?" :)

  • Status changed to Fixed 7 months ago
  • 🇦🇺Australia darvanen Sydney, Australia

    Thanks @ressa, didn't realise that extended to the readme but it makes sense (I copy/pasted I think)

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024