Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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).

    @shaon it looks like the error Dragonbird is seeing is caused by the call to 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)