Message Boards

Back

Ace theme src build for Liferay 7

Toggle
Ace theme src build for Liferay 7
Answer
7/28/17 7:20 AM
My organization purchased the Ace theme and I have downloaded the source and attempted to migrate to a Liferay 7 theme so we can make some modifications.

I get the following error when I run gulp build:

/Users/achase/development/liferay-modules/themes/ace-theme/node_modules/liferay-theme-tasks/tasks/build.js:336throw err;^Error: build/_css/main.scssError: It's not clear which file to import for '@import "custom"'.       Candidates:         _custom.scss         custom.css       Please delete or rename all but one of these files.        on line 19 of build/_css/main.scss>> @import "custom";   ^
    at options.error (/Users/achase/development/liferay-modules/themes/ace-theme/node_modules/node-sass/lib/index.js:286:26)

Is the src available in Liferay 7 theme format or can you help us to get past this build error?
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
7/28/17 8:58 AM as a reply to Abre Chase.
I'm getting the same build error when I try to build from source using the plugins SDK.

      Exception in thread "main" com.liferay.sass.compiler.jni.internal.JniSassCompilerException: Error: It's not clear which file to import for '@import "custom"'.             Candidates:               _custom.scss               custom.css             Please delete or rename all but one of these files.              on line 19 of docroot/css/main.scss      >> @import "custom";         ^      at com.liferay.sass.compiler.jni.internal.JniSassCompiler.compileFile(JniSassCompiler.java:107)      at com.liferay.css.builder.CSSBuilder._parseSass(CSSBuilder.java:350)      at com.liferay.css.builder.CSSBuilder._parseSassFile(CSSBuilder.java:364)      at com.liferay.css.builder.CSSBuilder.execute(CSSBuilder.java:161)      at com.liferay.css.builder.CSSBuilder.main(CSSBuilder.java:109)
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
7/31/17 10:00 AM as a reply to Abre Chase.
I need a response on this.  We purchased the theme and need support.

I cross posted a similar message on the Liferay forum.

https://web.liferay.com/community/forums/-/message_boards/message/92495435
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/2/17 9:28 AM as a reply to Abre Chase.
Hi Abre Chase,

Ace is already migrated to Liferay 7,
Please download the source code from your themeray dashboard and apply your changes on it.
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/2/17 10:15 AM as a reply to Khaoula.
Hi Khaoula - 

Thanks for following up.

I do have the 7.x source and have tried importing it as both a plugins-sdk theme and native Liferay 7 theme (using gulp build) and I get the same CSS error when attempting to build.

Can you provide some basic instructions for importing the theme src into the Liferay IDE and building?  Should we be importing as a plugins-sdk theme or another method?

Thanks!

Abre Chase
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/2/17 10:39 AM as a reply to Abre Chase.
1-you need to make sure you have the osgi modules com.liferay.frontend.theme.* from 
liferay-portal-tomcat-7.0-ce-ga1\osgi\modules  in your bundle:

 *com.liferay.frontend.theme.admin.web.jar
 *com.liferay.frontend.theme.classic.web.jar
 *com.liferay.frontend.theme.contributor.extender.jar
 *com.liferay.frontend.theme.styled.jar
 *com.liferay.frontend.theme.unstyled.jar

2-copy tomcat-8.0.32\webapps\ROOT\html\css folder from liferay 7 ga1 to your bundle

3-Create a file build.{username}_user.properties under your sdk
https://web.liferay.com/fr/community/forums/-/message_boards/message/72632442
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/3/17 1:36 PM as a reply to Khaoula.
Hi Khaoula - 

Both myself and a coworker tried the steps you recommended and we still have the same problem.

We're copying the theme src to the themes directory under the plugins-sdk.  Then importing using the Liferay Projects from Plugin SDK option.  And then using the Liferay / SDK / all option to build.

I'll attach a screenshot of the IDE and show the projects setup and results.  Maybe you can spot something obvious that we're doing wrong.

Also, maybe worth mentiuoning that we're trying on both Mac and Windows.

Thanks!

Abre
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/3/17 8:34 PM as a reply to Abre Chase.
Hi,

Can you please try to rename the custom.css 
file under 'ace-theme\docroot\_diffs\cssto _custom.scss  and try to re-build

0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/8/17 7:55 AM as a reply to Khaoula.
If I rename custom.css to _custom.css, I do get a clean build.


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0080e1}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0433ff}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #fd7a00}
span.s1 {color: #000000}
span.s2 {text-decoration: underline}
span.s3 {color: #0433ff}
span.s4 {text-decoration: underline ; color: #0080e1}
Buildfile: /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/build.xmlall:clean:   Deleting directory /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/WEB-INF/classes   Deleting: /Users/achase/development/liferay-modules/plugins-sdk/dist/ace-theme-7.0.0.1.wardeploy:     Copying 1120 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot     Copying 6 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/templates     Copying 128 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot     Copying 386 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot    Created dir: /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/WEB-INF/classes     Copying 5 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/WEB-INF/lib     Copying 2 files to /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/WEB-INF/classes     Copied 7 empty directories to 6 empty directories under /Users/achase/development/liferay-modules/plugins-sdk/themes/ace-theme/docroot/WEB-INF/classes     Using native Sass compiler     14:51:01,757 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,760 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,760 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,761 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,761 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,761 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     14:51:01,775 WARN  [CSSNodeToDomainObject:895] Media expression uses unknown feature '-ms-high-contrast'     Parsed /css/aui.scss in 1327ms     Parsed /css/main.scss in 220ms     Parsed /font-awesome/scss/font-awesome.scss in 45ms      Building zip: /Users/achase/development/liferay-modules/plugins-sdk/dist/ace-theme-7.0.0.1.war     Copying 1 file to /Users/achase/development/liferay-modules/bundles/liferay-ce-portal-7.0-ga4/deployBUILD SUCCESSFULTotal time: 7 seconds

But when I compare the war to the version you provided, it is very different.  Also, when this war is deployed, it has problems at runtime.  Lots of 404 errors for missing files (see attached).

Are you able to build this source using the latest version of the Liferay IDE?
0 (0 Votes)

RE: Ace theme src build for Liferay 7
Answer
8/14/17 2:02 AM as a reply to Abre Chase.
We still need help on this.  We purchased the theme with the expectation that we would have access to the source for the 7.x version.  Please provide updated source or instructions for how to get the current source package to work in the 7.x build process.  Thanks.
0 (0 Votes)