Title: Maurent's Replies | WordPress.org

---

# Maurent

  [  ](https://wordpress.org/support/users/mrnt/)

 *   [Profile](https://wordpress.org/support/users/mrnt/)
 *   [Topics Started](https://wordpress.org/support/users/mrnt/topics/)
 *   [Replies Created](https://wordpress.org/support/users/mrnt/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/mrnt/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/mrnt/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/mrnt/engagements/)
 *   [Favorites](https://wordpress.org/support/users/mrnt/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery] TypeError: undefined is not an object (evaluating ‘n.replace’)](https://wordpress.org/support/topic/typeerror-undefined-is-not-an-object-evaluating-n-replace/)
 *  [Maurent](https://wordpress.org/support/users/mrnt/)
 * (@mrnt)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/typeerror-undefined-is-not-an-object-evaluating-n-replace/#post-8401902)
 * We are also seeing this on the admin page for creating a custom post type used
   in another plugin. Because the browser throws a js error other functionality 
   on the page is not working.
 * CAUSE:
    What is happening is that the igw.min.js script is being loaded on the
   page and throws an error: Uncaught TypeError: Cannot read property ‘hasClass’
   of undefined on this line: n = n.replace(/width=\d+/, “width=” + o.width.toString()),
   n = n.replace(/height=\d+/, “height=” + o.height.toString()), i.attr(“href”, 
   n) because a couple of lines above it is doing this: var i = t(“.ngg-add-gallery”),
   n = i.attr(“href”), Since this is not a regular ‘Add New Post’ page there are
   no NextGen buttons so the element “.ngg-add-gallery” does not exist and hence‘
   i’ is empty and ‘n’ is undefined, so accessing attributes of n will cause an 
   error.
 * SOLUTION:
    There is no reason for NextGen to be loading this script anywhere 
   except its own custom post type pages. If NGG must load the script, then the 
   script should test for the presence of an element with class ‘ngg-add-gallery’
   before blindly trying to access properties on it (which is what is causing the
   error).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Download Manager] argument #2 is not an array](https://wordpress.org/support/topic/argument-2-is-not-an-array-1/)
 *  [Maurent](https://wordpress.org/support/users/mrnt/)
 * (@mrnt)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/argument-2-is-not-an-array-1/#post-6810642)
 * [@shaon](https://wordpress.org/support/users/shaon/) it looks like the error 
   Dragonbird is seeing is caused by the call to [http://www.wpdownloadmanager.com/versions.php](http://www.wpdownloadmanager.com/versions.php)
   
   on line 522 of wpm-core.php, which is returning this:
 *     ```
       Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/wpdownlo/public_html/versions.php on line 62
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)