WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Invalid Argument Javascript Errors - solution (1 post)

  1. L O Lawson
    Member
    Posted 10 months ago #

    shutter.js and shutter_reloaded.js were throwing javascript errors on lines 36 and 44 respectively. Below is a solution I found.

    To quote the original source of the fix,

    "looks like javascript may not directly access someLink.href when doing string matching when looping through a collection of DOM nodes. Whether this is tied to your doctype or triggered by some other script, or a security change with a service pack update, I'm not sure, and it's quite weird."

    The Fix:

    Replace

    ext = ( L.href.indexOf('?') == -1 ) ? L.href.slice(-4).toLowerCase() : L.href.substring( 0, L.href.indexOf('?') ).slice(-4).toLowerCase();

    at each location with

    ext = ( L.getAttribute('href').indexOf('?') == -1 ) ? L.getAttribute('href').slice(-4).toLowerCase() : L.getAttribute('href').substring( 0, L.getAttribute('href').indexOf('?') ).slice(-4).toLowerCase();

    Hope that helps save someone else some time!

    http://wordpress.org/plugins/nextgen-gallery/

Reply

You must log in to post.

About this Plugin

About this Topic