掲示板

Unable to create a Control Panel derivated Theme

thumbnail
9年前 に J Viso によって更新されました。

Unable to create a Control Panel derivated Theme

New Member 投稿: 14 参加年月日: 13/09/26 最新の投稿
Hi everybody,

I used maven to create a Classic derivated theme succesfully, but i can't do it with Control Panel theme. I'd to create a theme for the Liferay Control Panel, so I'm setting "control_panel" as the parent theme. But it seems something is wrong because when compiling and creating the theme war, Maven doesn't copy the Control Panel Theme files, it just copies the files from "_unstyled" and "styled" themes, so the final resulting theme it's not working well.

This is the piece of the console output where you can see the copied files:

--- liferay-maven-plugin:6.1.2:theme-merge (default) @ epsilon-liferay-cpanel-theme ---
Parent theme group ID com.liferay.portal
Parent theme artifact ID portal-web
Parent theme version 6.1.2
Parent theme ID control_panel
Copying html/themes/_unstyled/templates to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/templates
Copying html/themes/_unstyled/css to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/css
Copying html/themes/_unstyled/images to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/images
Copying html/themes/_unstyled/js to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/js
Copying html/themes/_styled/css to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/css
Copying html/themes/_styled/images to /opt/src/eplus/trunk/epsilon/core/frontend/liferay/cpanel-theme/target/epsilon-l­iferay-cpanel-theme-1.0.0-SNAPSHOT/images


And this is the configuration on the pom.xml:

<properties>
<liferay.theme.parent>control_panel</liferay.theme.par­ent>
...
</properties>


Am I doing something wrong? Can I show you something else to find the problem?

Thanks in advance for your help.

j.viso
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Unable to create a Control Panel derivated Theme

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
I know if you use the SDK it will work.

Make sure you're using the latest version of the maven plugins and that it is pointing at a real liferay bundle. In the SDK, the theme must be found to pull it in. I don't know if the fallback is to use _unstyled, but I guess it might be better than an outright failure.
thumbnail
9年前 に J Viso によって更新されました。

RE: Unable to create a Control Panel derivated Theme

New Member 投稿: 14 参加年月日: 13/09/26 最新の投稿
Hi David, thanks for your comment.

SDK it's no suitable for us since we are using a not supported version of JBoss.

I checked the plugin configuration and it's pointing to the correct Liferay installation path. And I changed the plugin version to the last one, 6.2.10.6, but I get same result, the plugin doesn't include the cpanel_theme files even if it's the parent theme.

BTW, if this is not the correct place to post about the Maven plugin, please tell me which is the correct one.
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Unable to create a Control Panel derivated Theme

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
SDK doesn't need a 'supported version of jboss'. Heck, you can keep a tomcat bundle close by for the builds.

The SDK is just used to build the artifacts. Once you have done that, you can grab the war file from the SDK/dist directory and push that to jboss.

It's fine to post here cuz your post is theme related, so that should be alright. The maven plugins are not as fully baked as the SDK is (the SDK's been with us for many years and handles everything pretty well by now, but to me the maven plugins are still new and still have bugs that the SDK purged long ago).

It may be easier to set up your theme project in the SDK... Will get you back on the road to standing up your portal w/o trying to figure out maven issues...
thumbnail
9年前 に Denis Signoretto によって更新されました。

RE: Unable to create a Control Panel derivated Theme

Expert 投稿: 375 参加年月日: 09/04/21 最新の投稿
Hi J,

I get the some problem.
It's an issue that affects only maven that doesn't handle the _diffs files of control_panel theme.

To get it working I had to:
  • copy ${liferay.app.server.portal.dir}\html\themes\control_panel\_diffs\css to src\main\webapp\css
  • copy ${liferay.app.server.portal.dir}\html\themes\control_panel\_diffs\js to src\main\webapp\js
  • copy ${liferay.app.server.portal.dir}\html\themes\control_panel\_diffs\templates to src\main\webapp\templates
  • copy ${liferay.app.server.portal.dir}\html\themes\classic\_diffs\css\custom_common.css to src\main\webapp\css\custom_common.css
  • modify src\main\webapp\css\custom.css to correcly references custom_common.css taken form classic


I've opened an issue for it: https://issues.liferay.com/browse/MAVEN-132

HTH,
Denis.
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: Unable to create a Control Panel derivated Theme

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
I believe, Dennis, that the _diffs folder is not necessary for maven themes. If I remember correctly, part of the Liferay maven build process the parent theme is pulled into the target directory and then the src directory stuff is overlayed.

Ant needed the _diffs folder because there wasn't the separate src/target folder structures, but Maven doesn't have that issue.