掲示板

Theme migration from 6.0 to 6.1? Theme deployment fail

thumbnail
12年前 に Aaron Paxson によって更新されました。

Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 102 参加年月日: 10/07/28 最新の投稿
I can't seem to find any docs on migrating custom 6.0 themes to 6.1. I upgraded my 6.0.6 installation to 6.1. When I add my theme, I get:


15:39:07,948 INFO  [PluginPackageUtil:1099] Reading plugin package for MyTeneo_Theme-theme
15:39:08,364 INFO  [ThemeHotDeployListener:172] Registering themes for MyTeneo_Theme-theme
15:39:08,369 ERROR [ThemeLocalServiceImpl:488] Themes in this WAR are not compatible with Liferay Portal Community Edition / 6.1.0
15:39:08,370 INFO  [ThemeHotDeployListener:105] 0 themes for MyTeneo_Theme-theme are available for use


Since this is a portal instance, I cannot access the site. It does an infinite redirection. I'm guessing because the theme isn't deployed, but I can't access it to change the theme.

My log file fills up with:


15:48:28,012 WARN  [ThemeLocalServiceImpl:149] No theme found for specified theme id MyTeneo_Theme_WAR_MyTeneo_Themetheme. Returning the default theme.
15:48:28,013 ERROR [ThemeLocalServiceImpl:173] No theme found for default theme id MyTeneo_Theme_WAR_MyTeneo_Themetheme. Returning a random theme.


Anyone know how I can migrate my theme, or tell Liferay that it's a 6.1 theme?

Thanks!
thumbnail
12年前 に Maarten van Heiningen によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail (回答)

Regular Member 投稿: 174 参加年月日: 09/02/05 最新の投稿
Hi Aaron,

In the WEB-INF foder of your theme there is a file "Liferay-look-and-feel.xml"

In the Liferay-look-and-feel.xml file you set some properties for the theme and also what server version it is ment to run on.

<!--?xml version="1.0"?-->


<look-and-feel>
	<compatibility>
		<version>6.1.0+</version>
	</compatibility>
	<theme id="THEMEID" name="THEMENAME" />
</look-and-feel>


In here you see that it states to run on 6.1.0+ so on a 6.1 or higher server.

This should do the trick for you
thumbnail
12年前 に Aaron Paxson によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 102 参加年月日: 10/07/28 最新の投稿
Maarten van Heiningen:


<!--?xml version="1.0"?-->


<look-and-feel>
	<compatibility>
		<version>6.1.0+</version>
	</compatibility>
	<theme id="THEMEID" name="THEMENAME" />
</look-and-feel>




Thanks Maarten! This definitely let Liferay deploy my theme. But, now I'm getting some vm template errors. Do you know if 6.1 changed any Velocity stuff? It could have just been a bad upgrade. I rolled everything back to get my site running again, and will try again later.
thumbnail
12年前 に Maarten van Heiningen によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 174 参加年月日: 09/02/05 最新の投稿
Hi Aaron,

Let me know what errors there where in your VM files. There should not be any if the original ones where at least from a version 6.0.
If they where from a Liferay 5 then yes upgrading would be wise.

Best,
Maarten
thumbnail
12年前 に Maarten van Heiningen によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 174 参加年月日: 09/02/05 最新の投稿
Hi Aaron,

Sorry I see you are migrating from 6.0 to 6.1.

Let me know what error messages you got while running the theme on 6.1

best,
Maarten
thumbnail
12年前 に Aaron Paxson によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 102 参加年月日: 10/07/28 最新の投稿
There are a couple of things. First, on my template:


ERROR [error_jsp:423] javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'include' in class com.liferay.taglib.util.VelocityTaglib threw exception java.lang.NullPointerException at MyTeneo_Theme-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 99, column 8]


Which equates to my last line: $theme.include($bottom_include)

I also get the following from my hook plugin:


WARNING: Failed to process TLD with path [http://java.sun.com/portlet_2_0] and URI [/WEB-INF/tld/liferay-portlet.tld]
java.net.MalformedURLException


Any suggestions? Because of this, I cannot load the portal in a browser.

Thanks!
thumbnail
12年前 に Maarten van Heiningen によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 174 参加年月日: 09/02/05 最新の投稿
Hi Aaron,

The "_SERVLET_CONTEXT_/templates/portal_normal.vm" error is known and there is a hack to solve this.

In your portal-ext.properties you can set the following:

hot.deploy.listeners=\
com.liferay.portal.deploy.hot.PluginPackageHotDeployListener,\
com.liferay.portal.deploy.hot.HookHotDeployListener,\
com.liferay.portal.deploy.hot.PortletHotDeployListener,\
com.liferay.portal.deploy.hot.ThemeHotDeployListener,\
com.liferay.portal.deploy.hot.ThemeLoaderHotDeployListener,\
com.liferay.portal.deploy.hot.LayoutTemplateHotDeployListener,\
com.liferay.portal.deploy.hot.MessagingHotDeployListener


This ensures that the theme is loaded before the layout and so the servlet context is registered.

Best,
Maarten
12年前 に MICHAIL MOUDATSOS によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 110 参加年月日: 11/10/04 最新の投稿
I migrated my theme project as follows. I ran create.bat giving the name and description of my theme in 6.0.6. then I added all the remaining files. I called ant deploy and got the following message on console:
15:47:43,736 INFO  [AutoDeployDir:167] Processing ThemeView-theme-6.1.0.1.war
15:47:43,775 INFO  [ThemeAutoDeployListener:44] Copying themes for C:\Liferay\liferay-portal-6.1.0-ce-ga1\deploy\ThemeView-theme-6.1.0.1.war
  Expanding: C:\Liferay\liferay-portal-6.1.0-ce-ga1\deploy\ThemeView-theme-6.1.0.1.war into C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779
  Copying 1 file to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779\WEB-INF
  Copying 1 file to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779\WEB-INF\classes
  Copying 1 file to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779\WEB-INF\classes
  Copying 1 file to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779\WEB-INF
  Warning: css\.sass-cache\application.css modified in the future.

...

  Warning: templates\portal_pop_up.vm modified in the future.
  Warning: templates\portlet.vm modified in the future.
  Copying 718 files to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ThemeView-theme
  Copying 1 file to C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ThemeView-theme
  Deleting directory C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\temp\20120123154743779
23 +β+-+? 2012 3:48:03 +-+- org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Liferay\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\ThemeView-theme
15:48:03,206 INFO  [PluginPackageUtil:1099] Reading plugin package for ThemeView-theme
15:48:03,284 INFO  [ThemeHotDeployListener:172] Registering themes for ThemeView-theme
15:48:03,289 ERROR [ThemeLocalServiceImpl:488] Themes in this WAR are not compatible with Liferay Portal Community Edition / 6.1.0
15:48:03,293 INFO  [ThemeHotDeployListener:105] 0 themes for ThemeView-theme are available for use
15:48:03,985 INFO  [ThemeAutoDeployListener:50] Themes for C:\Liferay\liferay-portal-6.1.0-ce-ga1\deploy\ThemeView-theme-6.1.0.1.war copied successfully. Deployment will start in a few seconds.


I wonder why I got this message: Themes in this WAR are not compatible with Liferay Portal Community Edition / 6.1.0

What should we be aware of when we migrate our themes from 6.0.6 to 6.1? Should I make a different post?

Thank you in advance!
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
In your theme/docroot/WEB-INF/liferay-look-and-feel.xml file, what do you have listed in the <version> element?
12年前 に MICHAIL MOUDATSOS によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 110 参加年月日: 11/10/04 最新の投稿
<version>6.0.5+</version>

Doesn't this mean 6.0.5 and above?
Does this concern only 6.0.x that are above 6.0.5 or any version?
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
It should mean that the theme is compatible with anything greater than 6.0.5, including 6.1...

You could try changing it to 6.1.0+ and see if that fixes your compatibility message...
12年前 に MICHAIL MOUDATSOS によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Regular Member 投稿: 110 参加年月日: 11/10/04 最新の投稿
yep, that was it! Thank you very much!
(However it is a bit rediculous, isn't it?)

Deployment finished normally. Then I got some other errors (complaints about a .vm file) which I later found that they where upgrade-related and as I have stated here they disappeared when I tried my upgrade with a portal-ext.properties file which contained the minimum required info (conection credentials and company info).

So, thanks again!
thumbnail
12年前 に Rick Osborn によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

New Member 投稿: 14 参加年月日: 11/05/24 最新の投稿
Aaron Paxson:
There are a couple of things. First, on my template:


ERROR [error_jsp:423] javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'include' in class com.liferay.taglib.util.VelocityTaglib threw exception java.lang.NullPointerException at MyTeneo_Theme-theme_SERVLET_CONTEXT_/templates/portal_normal.vm[line 99, column 8]


Thanks!


I got this exact error. Here is how I fixed it.

1. Create a new theme in the 6.1 SDK.
2. Change the build.xml so it inherits from "classic" not "_styled".
3. Drop your "_diff" changes from your old theme into the new one.
4. Build and deploy.

Step #2 held me back and gave ne your error.
thumbnail
11年前 に Brian Scott Schupbach によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

Expert 投稿: 329 参加年月日: 08/10/23 最新の投稿
This is probably pretty rare but I was receiving the same error when someone had set all the pages to "hidden" in my site. The $include(bottom was throwing the error.
11年前 に Vanita Chawla によって更新されました。

RE: Theme migration from 6.0 to 6.1? Theme deployment fail

New Member 投稿: 23 参加年月日: 10/03/25 最新の投稿
This was very helpful. I ensure one of the pages on the site was not "hidden" and the error stopped. We were getting the error only as the omni admin user upon login and search. Thanks to the thread and Brian's post, we are able to resolve it.

Brian Scott Schupbach:
This is probably pretty rare but I was receiving the same error when someone had set all the pages to "hidden" in my site. The $include(bottom was throwing the error.