I set my bundler to 15 for css and 15 for js according to ticket https://www.drupal.org/node/2897555. However, with the bundler at 15, certain project/H5P javascript is broken. But when setting the bundler back to 5 it then works.

I have PMed you a page that demonstrates the broken js.

Comments

webservant316 created an issue. See original summary.

mikeytown2’s picture

Looks like a minification issue. Can I get a zip of the page with core and advagg js disabled?

This is where the JS is having issues

a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[./]*?\
ction a(a){
webservant316’s picture

PMed you the requested page. It works as you guessed. What's next?

mikeytown2’s picture

Component: Bundler » Compression/Minification
Category: Bug report » Support request

It's a issue with the minifier in use.
Using https://github.com/CreateJS/SoundJS/blob/master/lib/soundjs-0.6.2.combin... instead of https://github.com/CreateJS/SoundJS/blob/master/lib/soundjs-0.6.2.min.js might help.

If not the regex needs fixing in the js file.

This
a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[./]*?\//i,a.EXTENSION_PATT=/\/?[^/]+\.(\w{1,5})$/i
Should be this (escape / with \).
a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[.\/]*?\//i,a.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i

The minifier sees // as an inline comment and cuts off the rest of the JS file. You can also tell advagg to not compress this file.

webservant316’s picture

Thanks @mikeytown2. The problem is now fixed over here https://www.drupal.org/node/2803319.

mikeytown2’s picture

Status: Active » Closed (works as designed)

Glad to hear you got the bottom of this issue!

paalj’s picture

Thanks @mikeytown2 for getting to the bottom of this one. You have been mentioned here:
h5p.org/post-hub-releases