Title: Plugin Causing Javascript Error in WordPress Admin
Last modified: August 30, 2016

---

# Plugin Causing Javascript Error in WordPress Admin

 *  Resolved [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/)
 * 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/](https://wordpress.org/plugins/joan/)

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

[←](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/?output_format=md)
2

 *  Plugin Author [ganddser](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895470)
 * Hi Salpetriere,
    We have a limited access test WordPress site available. You 
   have to request a access credentials for security reasons. [Click Here](http://tryus.gandenterprisesinc.com/wp-admin/)
 *  Thread Starter [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895471)
 * Thanks. I’ve put through a request.
 *  Thread Starter [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895472)
 * 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/](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](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895476)
 * 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](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895477)
 * 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](http://www.jslint.com/)
    [JSHint](http://jshint.com/) [Code Beautify](http://codebeautify.org/jsvalidate)
 * 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](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895479)
 * 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](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895488)
 * Solved upgrade to 4.2.1.
 *  Thread Starter [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895491)
 * 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](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895492)
 * OK do you mind giving us a temp admin account we can take a look send it to support[
   @]ganddservices.com
 *  Thread Starter [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895497)
 * No probs. I just want to check a few things on my server first.
 * I’ll be in touch.
 *  Thread Starter [Salpetriere](https://wordpress.org/support/users/salpetriere/)
 * (@salpetriere)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895499)
 * 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](https://wordpress.org/support/users/ganddser/)
 * (@ganddser)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895500)
 * Awesome, glad you good everything on track.

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

[←](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/?output_format=md)
2

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

 * ![](https://ps.w.org/joan/assets/icon.svg?rev=2874850)
 * [Jock On Air Now (JOAN)](https://wordpress.org/plugins/joan/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/joan/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/joan/)
 * [Active Topics](https://wordpress.org/support/plugin/joan/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/joan/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/joan/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [json](https://wordpress.org/support/topic-tag/json/)

 * 27 replies
 * 2 participants
 * Last reply from: [ganddser](https://wordpress.org/support/users/ganddser/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/plugin-causing-javascript-error-in-wordpress-admin/page/2/#post-6895500)
 * Status: resolved