But since I upgraded to Primefaces 11.0.6 I encounter JavaScript Errors on page load while the menu tries to resore it's state from the cookie "harmony_expandeditems".
As a result the active menu entry is not highlighted and expanded submenus are not expanded anymore after page reload/switch.
I also tested Primefaces 11.0.8 which produces the same error.
There is a bug report for Primefaces 12 which describes a similar problem and states that the pipe character in the elemets ids needs to be escaped:
https://github.com/primefaces/primefaces/issues/9143
This error appears in JavaScript console in browser:
Code: Select all
12:19:51.144 Uncaught Error: Syntax error, unrecognized expression: #mainmenuform\:MainMenu__40f8676d-e2f9-4de1-8c5e-66d82e2b02ba|1
jQuery 7
restoreMenuState http://localhost:8080/webapp/javax.faces.resource/js/layout.js.faces?ln=harmony-layout:337
init http://localhost:8080/webapp/javax.faces.resource/js/layout.js.faces?ln=harmony-layout:36
Class.extend/e[d]< http://localhost:8080/webapp/javax.faces.resource/core.js.faces?ln=primefaces&v=11.0.6&e=11.0.6:24
c http://localhost:8080/webapp/javax.faces.resource/core.js.faces?ln=primefaces&v=11.0.6&e=11.0.6:24
createWidget http://localhost:8080/webapp/javax.faces.resource/core.js.faces?ln=primefaces&v=11.0.6&e=11.0.6:18
cw http://localhost:8080/webapp/javax.faces.resource/core.js.faces?ln=primefaces&v=11.0.6&e=11.0.6:18
<anonymous> http://localhost:8080/webapp/portal/home.faces:97
jquery.js.faces:2:13639