• Resolved Salpetriere

    (@salpetriere)


    Jock on air now is causing the following Javascript error on all admin pages of WordPress.

    SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    
    ...tion(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(...

    I’ve deactivated all other plugins and switched themes and can confirm that this plugin is causing the js error.

    I’m using the latest version of WordPress.

    The js error is causing a few other admin functions not to work correctly.

    Is there a fix for this?

    https://wordpress.org/plugins/joan/

Viewing 12 replies - 16 through 27 (of 27 total)
  • Plugin Author ganddser

    (@ganddser)

    Hi Salpetriere,
    We have a limited access test WordPress site available. You have to request a access credentials for security reasons. Click Here

    Thread Starter Salpetriere

    (@salpetriere)

    Thanks. I’ve put through a request.

    Thread Starter Salpetriere

    (@salpetriere)

    I’ve just logged into the test site on your server and can confirm that the javacript error is indeed occurring on your server.

    Here’s a screengrab – http://postimg.org/image/tk3py9alz/

    I’ve tested this across a multitude of hosting systems now. This javascript error is not caused by the hosting setup. It’s an error with the plugin code.

    It likely resides in the admin.js file.

    Also, you’ve added me as an author of the plugin. I’ve not authored the plugin, I’m simply helping you bring it up to current standards. Could you remove me as an author?

    Plugin Author ganddser

    (@ganddser)

    OK. Could exactly get it to trow the same error, did get “Uncaught SyntaxError: Unexpected token <” but no indication as to from where anyway we’ll spend sometime on it this weekend.
    Is it possible that this is the cause of the image problems?

    Thread Starter Salpetriere

    (@salpetriere)

    Sounds good.

    The error you mention above – you saw that in the chrome dev console yeah? It’s the chrome specific wording of the same JS error. The supplied screen grab is of the error as presented in Firefox.

    My suspicion is that yes, this could be causing the image problems people are mentioning.

    I’m almost certain that this is being caused by something within the admin.js file. The error only occurs in the WP dashboard and I believe that file is only being enqueued within the dashboard.

    I’m not particularly well versed in javascript though so I wouldn’t know where within that file exactly.

    I have run it through some JS testing tools, and they all throw back heaps of errors. Some of the tools are as follows,

    JSLint
    JSHint
    Code Beautify

    They all make quite a few references to the long line of code on line eleven, entitled jQuery Cookie Plugin v1.2. Is it possible that the JS plugin code used there is outdated &/or incorrectly implemented?

    Plugin Author ganddser

    (@ganddser)

    Yeah we did use those tools.Thanks the code is a bit complex and we have to go through it line by line and column. Will post update as soon as it’s all fixed.

    Plugin Author ganddser

    (@ganddser)

    Solved upgrade to 4.2.1.

    Thread Starter Salpetriere

    (@salpetriere)

    I’m still getting the JS error, though now it only occurs on the edit schedule page in the admin.

    Also my schedule in the ‘Jock On Air Now’ page of the admin is now completely empty, though the programs still appear on the front end of the site.

    Plugin Author ganddser

    (@ganddser)

    OK do you mind giving us a temp admin account we can take a look send it to support[@]ganddservices.com

    Thread Starter Salpetriere

    (@salpetriere)

    No probs. I just want to check a few things on my server first.

    I’ll be in touch.

    Thread Starter Salpetriere

    (@salpetriere)

    Just a quick note to let you know my previously mentioned error is now resolved.

    Thanks for the updates and great support!

    Plugin Author ganddser

    (@ganddser)

    Awesome, glad you good everything on track.

Viewing 12 replies - 16 through 27 (of 27 total)

The topic ‘Plugin Causing Javascript Error in WordPress Admin’ is closed to new replies.