gChart Broken after 6.0.13

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

14 Aug 2017, 20:25

If you take a look at the error thrown, you can see the request string with the versions.

Code: Select all

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)
Here is my POM file.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1.4</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.1.1</version>
</dependency>
If I change it to the following below, everything works fine.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.0.0</version>
</dependency>

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

14 Aug 2017, 20:27

I found the problem and reported this bug: https://github.com/primefaces-extension ... issues/475

I fixed it if you want to try the SNAPSHOT jar found here: https://oss.sonatype.org/content/reposi ... -SNAPSHOT/
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.7

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

14 Aug 2017, 21:17

So I replaced that PF-ext jar file and I'm getting the following on the client side:

Code: Select all

primefaces-extensions.js.html?ln=primefaces-extensions&v=6.2:952 Uncaught ReferenceError: google is not defined
    at Class.init (http://localhost:8080/powerptc/javax.faces.resource/primefaces-extensions.js.html?ln=primefaces-extensions&v=6.2:952:9)
    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:2682
Am I missing a dependency on my end? Do I need to manually include a script that I'm not seeing in the docs?

BTW, thanks for your assistance!

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

14 Aug 2017, 21:40

So if I manually add the loader for Google Charts, everything works. Is that how things are supposed to function now, does the consuming application need to include the script?

Code: Select all

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

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

15 Aug 2017, 13:10

Yes unfortunately since this script is external it is not loaded as part of the component you have to add it your the page yourself.

You can read the reason why here in this issue that was filed: https://github.com/primefaces-extension ... issues/453

We followed the same pattern the Primefaces GMap took by having you include the script once yourself.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.7

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

15 Aug 2017, 13:49

OK, good to know, you may want to document that as part of the showcase, as I was looking around and didn't see that. This is also a change from previous versions, as I've didn't have the script included in the past. Thanks again for all you help! Do you have any idea on when 6.2 of pf-ext will be released?

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

15 Aug 2017, 13:59

For the 6.2 release I have added that script addition to the showcase example.

PFE 6.2 gets releases in lock step with PF 6.2. Based on previous PF releases I am guessing 6.2 is not for a while.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.7

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

15 Aug 2017, 14:28

Is there a patch available for the current release or can the fix be back-ported to the 6.1.X branch? Thanks again!

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

15 Aug 2017, 14:49

PFE has typically not backported fixes. They usually say we know our 6.1 works with PF 6.1. So if PF breaks something in 6.1.4 it would get fixed in 6.2 and our original 6.1 release is always certified to match the open source PF 6.1 release.

What you can do is take that JAR I sent you and simply name it 6.1.1-patch or something like that in your ./m2 or your NExus repository and use that JAR against PF 6.1.4. It should work fine.

I know that's not a great answer but that is what the PFE manifesto has been to always have a working JAR for the community release and not for PF Elite releases.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.7

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

15 Aug 2017, 14:57

Your answer is perfectly fine, I can import the 6.2-Snapshot into my maven repo. So then I'm assuming there aren't any other breaking changes with the snapshot you sent me, is it basically the 6.1.1 release with the fix for the charts, or are there other changes in the snapshot?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests