Title: parseJSON error for Free Version (Uncaught SyntaxError: Unexpected token)
Last modified: August 30, 2016

---

# parseJSON error for Free Version (Uncaught SyntaxError: Unexpected token)

 *  Resolved [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/)
 * Hello,
 * I am currently experiencing an odd issue with the free version of your plugin
   that prevents the actual workflow diagram from showing on the “Edit Workflows”
   page. Ironically, this error doesn’t happen upon initial activation. It only 
   occurs after you modify the original “Test Workflow”, save, and then return back
   to the screen after a little while.
 * The error that occurs happen in javascript specifically in the drag-drop-jsplumb.
   js file. There is a line of code: “wfinfo = jQuery.parseJSON(param), in which
   the error occurs upon loading the visual workflow. The console error is “Uncaught
   SyntaxError: Unexpected token.
 * Is there a good recommendation for alleviating this or is this an issue in any
   older versions or the PRO version? We are very interested in purchasing the PRO
   version but we’d like to make sure this won’t be an issue going forward.
 * I’m not able to give you access to our backend, but I can provide a list of our
   plugins that we use to see if there any known compatibility issues.
 * Thanks,
 * Darnell
 * [https://wordpress.org/plugins/oasis-workflow/](https://wordpress.org/plugins/oasis-workflow/)

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

 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697354)
 * Hi Darnell,
 * It looks like the data is not properly stored in the DB.
 * Do the following:
    1. Install the plugin again. Make a copy of the data stored
   in fc_workflows and fc_workflow_steps.
 * 2. Modify the workflow and compare the data with the original data.
 * See if you see any difference. Also, if possible send me the old/new data.
 * Also, which browser are you using? Did you try using another browser? Does it
   work in another browser?
 *  Thread Starter [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697362)
 * Hi nuggetsol,
 * First of all thank you for your quick response! I’ve done as you’ve stated and
   compared the two sets of data upon initial install and after edit. I think I’ve
   found the issue that is happening. It appears that there are newline and carriage
   return characters that are being inserted into the JSON on save. So when doing
   a comparison using a BeyondCompare tool, I see that in addition the changed data,
   there are some new varying instances of “\n” and “\r” being saved within your
   JSON as well, which I’m assuming is why we are seeing errors. If these are escaped
   somehow, I think this would alleviate the issue.
 * As far as browsers are concerned, I do see the error in Chrome, FF, and IE. IE11
   throws: Invalid character error in jquery.js at “return a.JSON.parse(b+””) line.
   FireFox throws: SyntaxError: JSON.parse bad control character in string literal
   at line 1 column 74 of the JSON data. Chrome is the browser I used initially 
   for the errors in my first reply.
 * I will paste the first initial data list following the modified one below. Feel
   free to copy and paste these into two separate .txt files if you have a comparison
   tool on your end. Please let us know if we can assist with testing efforts and
   when you would expect a fix to be in place. We’d like to hopefully get this fully
   integrated into our website in the next coming weeks.
 * Thanks,
 * Darnell
 *  Thread Starter [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697363)
 * **1. Initial installation**
 * ** fc_workflows.wf_info:**
 * {“steps”:{“step0”:{“fc_addid”:”step0″,”fc_label”:”assignment”,”fc_dbid”:”2″,”
   fc_process”:”assignment”,”fc_position”:[“326px”,”568px”]},”step1″:{“fc_addid”:”
   step1″,”fc_label”:”review”,”fc_dbid”:”1″,”fc_process”:”review”,”fc_position”:
 * [“250px”,”358px”]},”step2″:{“fc_addid”:”step2″,”fc_label”:”publish”,”fc_dbid”:”
   3″,”fc_process”:”publish”,”fc_position”:[“119px”,”622px”]}},”conns”:{“0”:{“sourceId”:”
   step1″,”targetId”:”step2″,”connset”:
 * {“connector”:”StateMachine”,”paintStyle”:{“lineWidth”:3,”strokeStyle”:”blue”}}},”
   1″:{“sourceId”:”step2″,”targetId”:”step1″,”connset”:{“connector”:”StateMachine”,”
   paintStyle”:{“lineWidth”:3,”strokeStyle”:”red”}}},”2″:
 * {“sourceId”:”step1″,”targetId”:”step0″,”connset”:{“connector”:”StateMachine”,”
   paintStyle”:{“lineWidth”:3,”strokeStyle”:”red”}}},”3″:{“sourceId”:”step2″,”targetId”:”
   step0″,”connset”:{“connector”:”StateMachine”,”paintStyle”:
 * {“lineWidth”:3,”strokeStyle”:”red”}}},”4″:{“sourceId”:”step0″,”targetId”:”step1″,”
   connset”:{“connector”:”StateMachine”,”paintStyle”:{“lineWidth”:3,”strokeStyle”:”
   blue”}}}},”first_step”:[“step1”]}
 * ** fc_workflows.wf_additional_info:**
 * a:2:{s:16:”wf_for_new_posts”;i:1;s:20:”wf_for_revised_posts”;i:1;}
 * ** fc_workflows_steps:**
 * **ROw 1 (step_info): **
    {“process”:”review”,”step_name”:”review”,”assignee”:{“
   editor”:”Editor”},”status”:”pending”,”failure_status”:”draft”}
 * **ROw 1 (process_info):**
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 * **ROw 2 (step_info):**
    {“process”:”assignment”,”step_name”:”assignment”,”assignee”:{“
   author”:”Author”},”status”:”pending”,”failure_status”:”draft”}
 * **ROw 2 (process_info):**
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 * **ROw 3 (step_info): **
    {“process”:”publish”,”step_name”:”publish”,”assignee”:{“
   administrator”:”Administrator”},”status”:”publish”,”failure_status”:”draft”}
 * **ROw 3 (process_info):**
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 *  Thread Starter [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697364)
 * **1. After Edit (Changed the title & description of the initial “Test Workflow”.
   And lastly, I added the “Administrator” role to the review step)**
 * ** fc_workflows.wf_info:**
 * {“steps”:{“step0”:{“fc_addid”:”step0″,”fc_label”:”assignment”,”fc_dbid”:”2″,”
   fc_process”:”assignment”,”fc_position”:[“326px”,”568px”]},”step1″:{“fc_addid”:”
   step1″,”fc_label”:”review”,”fc_dbid”:”\r\n\r
 * \n1″,”fc_process”:”review”,”fc_position”:[“250px”,”358px”]},”step2″:{“fc_addid”:”
   step2″,”fc_label”:”publish”,”fc_dbid”:”3″,”fc_process”:”publish”,”fc_position”:[“
   119px”,”622px”]}},”conns”:{“0”:
 * {“sourceId”:”step1″,”targetId”:”step2″,”connset”:{“connector”:”StateMachine”,”
   paintStyle”:{“lineWidth”:3,”strokeStyle”:”blue”}}},”1″:{“sourceId”:”step2″,”targetId”:”
   step1″,”connset”:{“connector”:”StateMachine”,”paintStyle”:
 * {“lineWidth”:3,”strokeStyle”:”red”}}},”2″:{“sourceId”:”step1″,”targetId”:”step0″,”
   connset”:{“connector”:”StateMachine”,”paintStyle”:{“lineWidth”:3,”strokeStyle”:”
   red”}}},”3″:{“sourceId”:”step2″,”targetId”:”step0″,”connset”:
 * {“connector”:”StateMachine”,”paintStyle”:{“lineWidth”:3,”strokeStyle”:”red”}}},”
   4″:{“sourceId”:”step0″,”targetId”:”step1″,”connset”:{“connector”:”StateMachine”,”
   paintStyle”:{“lineWidth”:3,”strokeStyle”:”blue”}}}},”first_step”:[“step1”]}
 * ** fc_workflows.wf_additional_info:**
 * a:2:{s:16:”wf_for_new_posts”;i:1;s:20:”wf_for_revised_posts”;i:1;}
 * ** fc_workflows_steps:**
 * **ROw 1 (step_info): **
    {“process”:”review”,”step_name”:”review”,”assignee”:{“
   editor”:”Editor”,”administrator”:”Administrator”},”status”:”pending”,”failure_status”:”
   draft”}
 * **ROw 1 (process_info):**
    {“assign_subject”:””,”assign_content”:”\n\n”,”reminder_subject”:””,”
   reminder_content”:”\n\n”}
 * **ROw 2 (step_info): **
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 * **ROw 2 (process_info):**
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 * **ROw 3 (step_info): **
    {“process”:”publish”,”step_name”:”publish”,”assignee”:{“
   administrator”:”Administrator”},”status”:”publish”,”failure_status”:”draft”}
 * **ROw 3 (process_info):**
    {“assign_subject”:””,”assign_content”:””,”reminder_subject”:””,”
   reminder_content”:””}
 *  Thread Starter [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697376)
 * For verification, I also just manually removed those “\n” and “\r” occurrences,
   and that seemed to have fixed the issue. Please let us know when this can be 
   accommodated! Thanks so much.
 * Darnell
 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697377)
 * Thank you for the logs and your effort to pinpoint the issue. This really helps.
 * Let me look into the issue and get back to you. We might need your help to test
   the changes before I can release a new version of the plugin.
 * In order to be able to send/receive files, do you mind opening a support ticket
   via – [http://www.oasisworkflow.com/submit-a-query](http://www.oasisworkflow.com/submit-a-query)
 * Thanks.
 *  Thread Starter [darnell.brown](https://wordpress.org/support/users/darnellbrown/)
 * (@darnellbrown)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697379)
 * No problem nuggetsol! Anything we can do to help we will. We are very impressed
   with the plugin so we’d like to see it flourish and continuously improve and 
   we’d like to incorporate the PRO version at some point into our websites that
   require approval workflows.
 * We’ll certainly be glad to help testing before a new version is released. I’ve
   put in a support ticket as you’ve requested. It got assigned to Ravi Ajmera.
 *  Plugin Author [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * (@nuggetsol)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697576)
 * The issue was fixed in v1.7. Closing this support ticket.

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

The topic ‘parseJSON error for Free Version (Uncaught SyntaxError: Unexpected token)’
is closed to new replies.

 * ![](https://ps.w.org/oasis-workflow/assets/icon-256x256.png?rev=1890301)
 * [Oasis Workflow](https://wordpress.org/plugins/oasis-workflow/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oasis-workflow/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oasis-workflow/)
 * [Active Topics](https://wordpress.org/support/plugin/oasis-workflow/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oasis-workflow/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oasis-workflow/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [nuggetsol](https://wordpress.org/support/users/nuggetsol/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/parsejson-error-for-free-version-uncaught-syntaxerror-unexpected-token/#post-6697576)
 * Status: resolved