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

  1. L O Lawson
    Posted 2 years 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:


    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!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic