Foren

New generated theme throws exception

K F, geändert vor 7 Jahren.

New generated theme throws exception

Junior Member Beiträge: 52 Beitrittsdatum: 11.01.17 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: New generated theme throws exception

Junior Member Beiträge: 50 Beitrittsdatum: 21.09.16 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: New generated theme throws exception

Junior Member Beiträge: 52 Beitrittsdatum: 11.01.17 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: New generated theme throws exception

Junior Member Beiträge: 50 Beitrittsdatum: 21.09.16 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: New generated theme throws exception

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
Check Wouter's reply to this other thread
Paul Allain, geändert vor 7 Jahren.

RE: New generated theme throws exception

Junior Member Beiträge: 77 Beitrittsdatum: 03.09.13 Neueste Beiträge
Same problem when deploying an admin theme.