Fórum

New generated theme throws exception

K F, modificado 7 Anos atrás.

New generated theme throws exception

Junior Member Postagens: 52 Data de Entrada: 11/01/17 Postagens Recentes
Hi Liferay community,

I have generated a new theme using yeoman generator, everything went fine. I have nothing changed in the new template but when I am starting using it (set a site template and then go to site) it throws exception:
31-Jan-2017 08:23:31.499 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception
FreeMarker template error:
Java method "Object.equals(Object)" takes 1 argument, but 2 was given.

----
FTL stack trace ("~" means nesting-related):
- Failed at: #if stringUtil.equals(page.getType(),... [in template "liferay-mynew-theme_SERVLET_CONTEXT_/templates/init.ftl" at line 156, column 9]
- Reached through: #include init [in template "liferay-mynew-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl" at line 3, column 1]
----
Lucy W, modificado 7 Anos atrás.

RE: New generated theme throws exception

Junior Member Postagens: 50 Data de Entrada: 21/09/16 Postagens Recentes
I have the identical error after deploying a styled theme built with yeoman and gulp. (Liferay DXP, tomcat server, Windows 10 64-bit machine)

Is there something that needs to be edited in the init.ftl template for the styled theme to deploy properly?

Line 156 of the init.ftl is:
<#if stringUtil.equals(page.getType(), "portlet")>
K F, modificado 7 Anos atrás.

RE: New generated theme throws exception

Junior Member Postagens: 52 Data de Entrada: 11/01/17 Postagens Recentes
Lucy W:
I have the identical error after deploying a styled theme built with yeoman and gulp. (Liferay DXP, tomcat server, Windows 10 64-bit machine)

Is there something that needs to be edited in the init.ftl template for the styled theme to deploy properly?

Line 156 of the init.ftl is:
<#if stringUtil.equals(page.getType(), "portlet")>


I suggest you to copy jsp files from classic theme and modify them for personal requirements.

https://github.com/liferay/liferay-portal/tree/master/modules/apps/foundation/frontend-theme/frontend-theme-classic/src/templates
Lucy W, modificado 7 Anos atrás.

RE: New generated theme throws exception

Junior Member Postagens: 50 Data de Entrada: 21/09/16 Postagens Recentes
K F:
I suggest you to copy jsp files from classic theme and modify them for personal requirements.


Thanks, I have done this. And also have used the gulp kickstart command to use the Classic theme as the base for a custom theme. However - the Classic theme is NOT an ideal base for a custom theme as it is a complete and complex structure that then needs to be overwritten.

The Theme Generator is throwing this error for many people when trying to use it as it's intended to install the Styled theme base. An actual fix would be awesome...
thumbnail
Olaf Kock, modificado 7 Anos atrás.

RE: New generated theme throws exception

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
Check Wouter's reply to this other thread
Paul Allain, modificado 7 Anos atrás.

RE: New generated theme throws exception

Junior Member Postagens: 77 Data de Entrada: 03/09/13 Postagens Recentes
Same problem when deploying an admin theme.