Created app in PrimeFaces 6.0 with no issues in Chrome. As soon as I moved the app to an SSL/HTTPS URL the page is scrambled and I get these errors in Chrome dev console:
Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
primefaces.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
idlemonitor.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
primefaces.css.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery-plugins.js.xhtml?ln=primefaces&v=5.2:5 Uncaught ReferenceError: jQuery is not defined
at jquery-plugins.js.xhtml?ln=primefaces&v=5.2:5:85
at jquery-plugins.js.xhtml?ln=primefaces&v=5.2:5:94
watermark.js.xhtml?ln=primefaces&v=5.2:1 Uncaught ReferenceError: jQuery is not defined
at watermark.js.xhtml?ln=primefaces&v=5.2:1:4891
Looked around on the 'Net and found that I needed to explicitly define where jquery is located, so I added the "src" section to the <script> tag:
<script language="JavaScript" type="text/javascript" src="/resources/javascript/jquery-2.0.3-min.js">
When I add the reference to jquery-2.0.3 my scripts no longer work. Again, this is Chrome. Seems to be fine in Safari and FireFox.
Wondering how to fix this. I don't mind upgrading to PrimeFaces 11 or any other version provided I include the correct JQuery version.
Issues finding jquery in Chrome
Don't load your own jQuery. It is provided by PrimeFaces. Loading your own will likely cause issues. https://stackoverflow.com/questions/161 ... typeerrors
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
Yes, I understand that loading my own Jquery might cause issues, but it's not finding the one provided by PrimeFaces when I access the app using SSL and a specific port like "https://localhost:7003/app_name"
It's also not finding my css and the other PrimeFaces included components:
Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
lis.css.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
core.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
idlemonitor.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
components.css.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery-plugins.js.xhtml?ln=primefaces&v=11.0.0:5 Uncaught ReferenceError: jQuery is not defined
at jquery-plugins.js.xhtml:5:85
at jquery-plugins.js.xhtml:5:95
It's also not finding my css and the other PrimeFaces included components:
Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
lis.css.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
core.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
idlemonitor.js.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
components.css.xhtml:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
jquery-plugins.js.xhtml?ln=primefaces&v=11.0.0:5 Uncaught ReferenceError: jQuery is not defined
at jquery-plugins.js.xhtml:5:85
at jquery-plugins.js.xhtml:5:95
When I added the <h:outputScript> tag for PrimeFaces JQuery as suggested in the TaskOverflow post, the error was a different.
It no longer complained about JQuery. It still needs to find watermark.js.xhtml and components.js.xhtml. I assume these are internal to PrimeFaces.
I have a feeling it's the port designation in the URL that is causing this.
It no longer complained about JQuery. It still needs to find watermark.js.xhtml and components.js.xhtml. I assume these are internal to PrimeFaces.
I have a feeling it's the port designation in the URL that is causing this.
To me it sounds like you have something wrong with your WAR or deployment?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 40 guests