Uncaught SyntaxError: Unexpected token / in JSON at position 0

43 views
Skip to first unread message

Kasey McDowell

unread,
Oct 14, 2018, 12:34:24 PM10/14/18
to Taffy Users
I am having an issue with Taffy 3.1.0, I have a 1 record test query that works fine on my test server running Coldfusion 2016 but on the production server running Coldfusion 9, I get the below error.

In the Console I get this:
Uncaught SyntaxError: Unexpected token / in JSON at position 0
    at JSON.parse (<anonymous>)
    at index.cfm:480
    at Object.<anonymous> (index.cfm:909)
    at i (index.cfm:304)
    at Object.fireWith [as rejectWith] (index.cfm:304)
    at A (index.cfm:306)
    at XMLHttpRequest.<anonymous> (index.cfm:306)


And in the sources I get this:
//{"COLUMNS":["TITLE","IMAGE_URL","DESCRIPTION","RANK"],"DATA":[["John Doe","piccomingsoon.jpg","QB",1]]}

It seems to be inserting // for some reason.

I attached a screen capture as well.

My dashboard is available at:  http://mulvanesports.com/api/v1/index.cfm

Any ideas?


Screen-Shot-2018-10-14-at-11.28.01-AM.jpg

Kasey McDowell

unread,
Oct 14, 2018, 5:06:05 PM10/14/18
to Taffy Users
For anyone who might have this issue, there is an option in the Coldfusion Administrator to "  //" It was enabled on the production server but not the test server. Instead of enabling it on the production server, I added this line to my Application.cfc file:

<cfset this.secureJSON = false>
Reply all
Reply to author
Forward
0 new messages