[Bug 27651] New: Warning of missing Bootstrap source map
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 Bug ID: 27651 Summary: Warning of missing Bootstrap source map Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: andrew.isherwood@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org Chrome Dev Tools is warning of a missing Bootstrap source map in the OPAC: DevTools failed to load SourceMap: Could not load content for https://xxxxx/opac-tmpl/bootstrap/lib/bootstrap/js/bootstrap.bundle.min.js.m...: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE (The xxxxx replaced the actual OPAC domain) I wouldn't have thought we would want to be referencing source maps in production, but I don't know if Bootstrap does that by default or whether we should be using a production build that doesn't reference it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 Janet McGowan <janet.mcgowan@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janet.mcgowan@ptfs-europe.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- I think this is essentially a duplicate of Bug 26471. Several minified JS files in Koha include comments which are intended to point to source map files if they are available, for instance //# sourceMappingURL=bootstrap.bundle.min.js.map If you have the Chrome dev tools open, Chrome assumes you want it to look for this map to help you with JavaScript debugging. When it doesn't find one it tells you so. This isn't an error which has any consequence to the end user. I don't know why Chrome chooses to warn you about missing source maps and Firefox doesn't. The options for addressing the error: 1. Don't address the error. It only appears if you are inspecting the source in Chrome dev tools. 2. Modify each minified JavaScript file we get from third-party sources which include sourceMappingURL. 3. Build our own minified JavaScript files for each JS library and include the option to generate source maps. My vote is #1, and WONTFIX. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 --- Comment #2 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- I'd add another option to that: 4. Build our own minified JavaScript files for Bootstrap and pass build options to not generate (and thus, not reference) source maps. The only reason the error is being generated is that the Bootstrap we're using has been built with source maps enabled and the path (as you mentioned, in the comment in the JS file) to the map in question is wrong, the file is there, it's just not accessible. It's a good job it's not accessible because it's 309K in size. As far as I can see, Bootstrap is the only library we're using that has been built with source maps. Anyway, as you say, it's not an issue, it's more of an annoyance to anyone who happens to be looking at the dev tools. So whether it's worth the effort of fixing is, IMHO, highly questionable! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I get bug 26471 on Firefox as well. I attached a patch there. Why not simply remove the line? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27651 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|NEW |RESOLVED --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
The options for addressing the error:
1. Don't address the error. It only appears if you are inspecting the source in Chrome dev tools.
2. Modify each minified JavaScript file we get from third-party sources which include sourceMappingURL.
3. Build our own minified JavaScript files for each JS library and include the option to generate source maps.
My vote is #1, and WONTFIX.
... and Owen is (almost) always right. Closing this one, see explanation in comment #1 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org