gChart Broken after 6.0.13

Community Driven Extensions Project
csyperski
Posts: 101
Joined: 16 Apr 2010, 14:36

15 Jun 2017, 03:37

I have a web app where the only thing I changed was primefaces was updated from 6.0.13 to 6.0.19 (with PF-ext 6.0.0) and it seems as if gChart broke somewhere in between. I need to renew my elite membership, so I don't currently have access to the version in between. With 6.0.13, everything worked as expected, but now on 6.0.19 I get the following error:

Code: Select all

VM3563:1 Uncaught SyntaxError: Unexpected token \ in JSON at position 1
    at JSON.parse (<anonymous>)
    at Class.init (http://localhost:8080/powerptc/javax.faces.resource/primefaces-extensions.js.html?ln=primefaces-extensions&v=6.0.0:40:133)
    at Class.prototype.(anonymous function) [as init] (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.0.19-SNAPSHOT:1915:26)
    at new Class (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.0.19-SNAPSHOT:1928:19)
    at Object.createWidget (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.0.19-SNAPSHOT:311:47)
    at Object.cw (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.0.19-SNAPSHOT:296:18)
    at http://localhost:8080/powerptc/protected/admin/graphs/fillratio.html:63:345
It looks let the json data has an extra escape character in it?

Code: Select all

{\"type\":\"PieChart\",\"options\":{},\"data\":[[\"Topping\",\"Slices\"],[\"Mushrooms\",2],[\"Onions\",22]]}
I've updated to PF 6.1.1 with PF-Ext 6.1.1 and I get the same error.

User avatar
Melloware
Posts: 334
Joined: 22 Apr 2013, 15:48

15 Jun 2017, 13:05

I think it is related to these two tickets...

https://github.com/primefaces-extension ... issues/463

https://github.com/primefaces/primefaces/issues/2395

Basically PF made a fix in 6.0.19 that is "double escaping" things that were already escaped. They made the fix in Elite 6.1.3 but you may have to request that they make it in a 6.0.X elite release as well if you comment on that #2395 ticket.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

csyperski
Posts: 101
Joined: 16 Apr 2010, 14:36

18 Jun 2017, 05:49

Thank you!

csyperski
Posts: 101
Joined: 16 Apr 2010, 14:36

11 Jul 2017, 21:54

I'm getting the same error with 6.1.3, was this actually included in this release?
VM249:1 Uncaught SyntaxError: Unexpected token \ in JSON at position 1
at JSON.parse (<anonymous>)
at Class.init (http://localhost:8080/powerptc/javax.fa ... 6.1:27:133)
at Class.prototype.(anonymous function) [as init] (http://localhost:8080/powerptc/javax.fa ... OT:1942:26)
at new Class (http://localhost:8080/powerptc/javax.fa ... OT:1955:19)
at Object.createWidget (http://localhost:8080/powerptc/javax.fa ... HOT:323:47)
at Object.cw (http://localhost:8080/powerptc/javax.fa ... HOT:308:18)
at http://localhost:8080/powerptc/protecte ... ml:59:2682

User avatar
Melloware
Posts: 334
Joined: 22 Apr 2013, 15:48

11 Jul 2017, 22:31

See below post....
Last edited by Melloware on 12 Jul 2017, 01:48, edited 1 time in total.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

User avatar
Melloware
Posts: 334
Joined: 22 Apr 2013, 15:48

12 Jul 2017, 01:47

I apologize it looks like they fix did not make the 6.1.3 release but will make the 6.0.22 and 6.1.4 release.

https://github.com/primefaces/primefaces/issues/2395
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

csyperski
Posts: 101
Joined: 16 Apr 2010, 14:36

12 Jul 2017, 02:59

I saw conflicting posts so thanks for the clarification.

User avatar
Melloware
Posts: 334
Joined: 22 Apr 2013, 15:48

11 Aug 2017, 13:07

6.1.4 was officially released.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

csyperski
Posts: 101
Joined: 16 Apr 2010, 14:36

14 Aug 2017, 19:27

So I just updated to 6.1.4 and I'm getting the same error....

Code: Select all

VM1122:1 Uncaught SyntaxError: Unexpected token \ in JSON at position 1
    at JSON.parse (<anonymous>)
    at Class.init (http://localhost:8080/powerptc/javax.faces.resource/primefaces-extensions.js.html?ln=primefaces-extensions&v=6.1:27:133)
    at Class.prototype.(anonymous function) [as init] (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:1953:26)
    at new Class (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:1966:19)
    at Object.createWidget (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:323:47)
    at Object.cw (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:308:18)
    at http://localhost:8080/powerptc/protected/admin/graphs/fillratio.html:59:268
The data is coming across as:

Code: Select all

{\"type\":\"PieChart\",\"options\":{},\"data\":[[\"Metric\",\"Value\"],[\"HS1 - Open Slots\",579],[\"HS1 - Breaks\",65],[\"HS1 - Scheduled Slots\",4],[\"HS2 - Open Slots\",0],[\"HS2 - Breaks\",0],[\"HS2 - Scheduled Slots\",0]]}
Am I missing something here?

User avatar
Melloware
Posts: 334
Joined: 22 Apr 2013, 15:48

14 Aug 2017, 20:02

OK and you are sure you are using PFE 6.1.1 with PF 6.1.4?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest