• Resolved Tim Reeves

    (@tim-reeves)


    Hi,

    I’ve noticed something weird: In FF29 and IE11, no problems. But Chrome tries to GET a …/plugins/gallery-slideshow/jquery.cycle2.js.map, which is of course “not found”. I can only say that this happens as last GET for the whole page, after the call to Piwik Analytics.

    Er ok, now I read this article and unchecked “Enable JavaScript source maps”, then it went away. But the question remains: This is a typical WP site with quite a few plugins, so there’s a lot of other minified JavaScript files belonging to this page – so why is the .min only requested for the jquery.cycle2.js file? Any ideas? Thanks!

    Tim Reeves

    https://wordpress.org/plugins/gallery-slideshow/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author jethin

    (@jethin)

    Hi Tim. I’m not exactly sure what the problem is on your site, but I suspect it’s related to one of your other plugins or site settings. The Gallery Slideshow plugin calls specific Javascript files, all of which are minified. Thanks.

    Plugin Author jethin

    (@jethin)

    Marking topic as resolved.

    schneidan

    (@schneidan)

    Hey — I still see this, but it has to do with how Source Mapping works. (http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/). It’s a way to show browsers where to find unminified versions of your .min.js files for debugging.

    In the version of jquery.cycle2.min.js included with the plugin, there is a reference to the source map on line 16:

    //@ sourceMappingURL=jquery.cycle2.js.map

    Deleting that line or providing the .map file along with the plugin should take care of the problem.

    Plugin Author jethin

    (@jethin)

    Nice work @schneidan. I wouldn’t say this is a “problem” in that source maps are used for debugging purposes. However, the Cycle 2 source map isn’t included in the plugin, so if you’re trying to debug the script for some reason you may note able to “auto-unminify” it. That said, if you really want the source map available you could either 1) change the mapping URL in the Cycle 2 script to http://malsup.github.io/min/jquery.cycle2.js.map or 2) copy that same map file into your gss plugin directory.

    Anyway, this has been a fun little detective case for an obscure non-issue.

    schneidan

    (@schneidan)

    Yeah, I just deleted that line in my copy of the plugin and that solved the problem.

    I was hoping to suggest you either delete that line or provide the map in future versions of the plugin so that when users update they don’t have to delete the line again. While you’re right — it’s not actually a problem — it does result in several issues:

    1) Clutters the console with errors for those of us trying to debug unrelated things, and
    2) Clutters server logs with irrelevant 404 errors that site operators have to unnecessarily sift through when looking for legitimate errors, and
    3) Wastes clients’ and servers’ time and power responding to irrelevant and futile requests.

    Ultimately, I’m suggesting that as a conscientious developer, it’d be nice if you solved the easily-fixable issue as a matter of courtesy. Not suggesting it needs a dedicated update, but commit the fix quick and just let it be included in whatever your next release is.

    I suggest removing line 16 in jquery.cycle2.min.js as the best fix, since it will reduce load times and server load and eliminate the problem. People who want to figure out how the jQuery plugin works can go look it up like I did. 🙂

    Plugin Author jethin

    (@jethin)

    OK, sourceMappingURL removed from C2 min source in GSS 1.3.1. Happy debugging. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bug in Chrome only: GET jquery.cycle2.js.map’ is closed to new replies.