menu.clearLayoutState is not a function

Post Reply
jjcapa
Posts: 4
Joined: 21 Apr 2011, 13:28

27 Jul 2021, 20:18

Recently, I bought Harmony Theme 3.0.0. Doing a Hello World project to test it, I'm getting this error message, which I don't know how to manage.
Obviously, the layout.js javascript file is present in the project, because the main pages is rendering properly.
Any idea or advice about what I can do?

Code: Select all

layout.js.xhtml?ln=harmony-layout:495 Uncaught TypeError: menu.clearLayoutState is not a function
    at Object.clearLayoutState (layout.js.xhtml?ln=harmony-layout:495)
    at Object.changeMenuMode (layout.js.xhtml?ln=harmony-layout:422)
    at HTMLInputElement.<anonymous> ((index):344)
    at Object.bcn (core.js.xhtml?ln=primefaces&v=8.0:16)
    at HTMLInputElement.onchange ((index):344)
    at Object.trigger (jquery.js.xhtml?ln=primefaces&v=8.0:2)
    at HTMLInputElement.<anonymous> (jquery.js.xhtml?ln=primefaces&v=8.0:2)
    at Function.each (jquery.js.xhtml?ln=primefaces&v=8.0:2)
    at k.fn.init.each (jquery.js.xhtml?ln=primefaces&v=8.0:2)
    at k.fn.init.trigger (jquery.js.xhtml?ln=primefaces&v=8.0:2)
clearLayoutState @ layout.js.xhtml?ln=harmony-layout:495
changeMenuMode @ layout.js.xhtml?ln=harmony-layout:422
(anonymous) @ (index):344
bcn @ core.js.xhtml?ln=primefaces&v=8.0:16
onchange @ (index):344
trigger @ jquery.js.xhtml?ln=primefaces&v=8.0:2
(anonymous) @ jquery.js.xhtml?ln=primefaces&v=8.0:2
each @ jquery.js.xhtml?ln=primefaces&v=8.0:2
each @ jquery.js.xhtml?ln=primefaces&v=8.0:2
trigger @ jquery.js.xhtml?ln=primefaces&v=8.0:2
(anonymous) @ components.js.xhtml?ln=primefaces&v=8.0:20
dispatch @ jquery.js.xhtml?ln=primefaces&v=8.0:2
v.handle @ jquery.js.xhtml?ln=primefaces&v=8.0:2
UPDATED
I've just tried with the demo project attached to the theme code running

Code: Select all

sass --update src/main/webapp/resources:src/main/webapp/resources --no-source-map
mvn jetty:run
I get the same exception, which happens when I try to navigate to any page.

Code: Select all

HTTP ERROR 500 javax.servlet.ServletException: javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
URI:	/harmony/dashboard.xhtml
STATUS:	500
MESSAGE:	javax.servlet.ServletException: javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
SERVLET:	Faces Servlet
CAUSED BY:	javax.servlet.ServletException: javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
CAUSED BY:	javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
CAUSED BY:	javax.faces.FacesException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
Caused by:
javax.servlet.ServletException: javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: javax.servlet.ServletException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
	at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:725)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:451)
	at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1452)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)
	at org.primefaces.harmony.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:26)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
	... 17 more
Caused by: javax.faces.FacesException: Error loading CSS, cannot find "theme.css" resource of "primefaces-harmony-" library
	at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:162)
	at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:102)
	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:540)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1644)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:468)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:170)
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:132)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:102)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:76)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:199)
	at javax.faces.webapp.FacesServlet.executeLifecyle(FacesServlet.java:708)
	... 43 more
Powered by Jetty:// 9.4.36.v20210114

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

29 Jul 2021, 06:40

Hi,

I will release a new version today for your issue.

Best Regards,

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

29 Jul 2021, 07:36

Hi,

New Harmony version released! Download version 3.0.1 and try again please.

Best Regards,

jjcapa
Posts: 4
Joined: 21 Apr 2011, 13:28

29 Jul 2021, 20:59

it works great!
Thank you so much.

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

30 Jul 2021, 06:45

You are welcome!

Best Regards,

Post Reply

Return to “Harmony - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests