• Resolved annaam

    (@annaam)


    Hi,

    Not sure when it first started, after 6.9 or after the latest Wordfence update, but when on the main Wordfence dashboard, it states in our scripts: missing dependencies, handle json2, source wp-includes/js/json2.min.js version 2015-05-03?

    Wordfence seems to be running normally.

    Does anyone know what that indicates? Seems odd.

    Best,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @annaam, thanks for reaching out!

    I believe this message is coming up because one of your plugins has listed json2 as a dependency. The file was originally present to help older browsers that lacked native JSON support, but looks like it may have been removed as part of the 6.9 update revisions. I believe it had been deprecated but still present for some time now.

    If you find the plugin causing the dependency message through a process of elimination, you may be able to find support or request an update through their forum.

    Thanks,
    Peter.

    Thread Starter annaam

    (@annaam)

    ssh-ing and grep-ing “json2”, I found that Wordfence does still reference it:

    plugins/wordfence/lib/wordfenceClass.php: wp_enqueue_script(‘json2’);

    plugins/wordfence/js/knockout-3.5.1.1764778641.js:e=”string”==typeof c?function(a){return a.name===c}:function(a){return c.test(a.name)},l=[],k=d.length-1;0<=k;k–)e(d[k])&&l.push(d[k]);return l},Nd:function(b){return”string”==typeof b&&(b=a.a.Db(b))?H&&H.parse?H.parse(b):(new Function(“return “+b))():null},hc:function(b,c,d){if(!H||!H.stringify)throw Error(“Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don’t support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js&#8221;);

    Plugin Support wfpeter

    (@wfpeter)

    Hi @annaam,

    I do apologize! You’re correct, there were some changes to missing dependency reporting between WordPress 6.8 and 6.9 that had been originally planned for 7.0, but rescheduled.

    Our development team were already working on removing the library citing json2 as a dependency in time for that change, but it’s now been moved forward thanks to your topic here. Most modern browsers won’t need it and it’s only enqueued when viewing Wordfence admin pages. This will be removed in our next plugin update and documented in our changelog.

    Thanks again,
    Peter.

    Thread Starter annaam

    (@annaam)

    Wonderful, many thanks to you and the team for such a fast response!

    Again, no issues seemingly functionally, I just use the Query Monitor plugin and it was showing red on the Wordfence dashboard — that’s the only way I noticed it.

    Thanks!

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

The topic ‘Missing Dependencies json2’ is closed to new replies.