Theme Contributors does not override the default theme

Description

Summary
It seems that there is a problem with the Theme Contributor and its ability to override changes to the default theme. To give background into this issue, while attempting to use product-navigation-control-menu-dxp-theme-contributor to replace the Control Menu's gradient to a different design, the new build does not reflect the design after deploying it to the Liferay environment.

Please be advised that this issue has been identified while trying to follow the dev.liferay.com guide on Theme Contributors: https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/theme-contributors (section on EDITING THEME CONTRIBUTORS).

Steps to Reproduce
1. Obtain the latest build of ee-7.0.x, and perform ant all to build an ee-7.0.x bundle – Start up the server, and keep it running while we perform the next steps

2. Locate /liferay-portal-ee/modules/private/apps/web-experience/product-navigation/product-navigation-control-menu-dxp-theme-contributor/src/main/resources/META-INF/resources/control_menu/_control_menu.scss and open this file in a text editor
_nameplates.
3. Locate line 35 which will read as follows:

4. Replace it with

and then save the file

5. In Terminal/Command Prompt, navigate to /liferay-portal-ee/modules/private/apps/web-experience/product-navigation/product-navigation-control-menu-dxp-theme-contributor

6. Run ../../../../../../gradlew build to start the build

7. Once the build has been successful, navigate to /liferay-portal-ee/tools/sdk/dist, and notice that com.liferay.product.navigation.control.menu.dxp.theme.contributor-1.0.5.jar has been created

8. Copy com.liferay.product.navigation.control.menu.dxp.theme.contributor-1.0.5.jar to $liferay.home/deploy

9. Once com.liferay.product.navigation.control.menu.dxp.theme.contributor-1.0.5.jar has been fully deployed, open up the browser to Liferay hostname (e.g. http://localhost:8080)

10. Sign in as test@liferay.com

Expected Result
Control Menu bar will be red, indicating that the Theme Contributor has overridden the default OOTB theme.

Actual Result
Control Menu is the default theme indicating that the changes did not reflect in Liferay

Reproduced in

  • ee-7.0.x commit 94db9f0418086df751fb837cf2ac14c70ca0d056

  • 7.0 DE DXP + Fix Pack 4

Activity

Show:

B SuhOctober 20, 2016 at 7:59 PM

Sass documentation indicates files with SCSS beginning with an underscore informs Sass to not compile it to a normal CSS file:

If you have a SCSS or Sass file that you want to import but don’t want to compile to a CSS file, you can add an underscore to the beginning of the filename. This will tell Sass not to compile it to a normal CSS file. You can then import these files without using the underscore.

http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials

If we make the change to the main scss (arbitrary edit, like a line break), then it forces the partials to get picked up on the next build.

Zsolt SzaboOctober 5, 2016 at 4:00 AM
Edited

Hey Guys,

After a quick investigation it seems that the content of '.sass-cache' folder won't be updated in case of rebuilding this module.

Won't Fix

Details

Assignee

Reporter

Components

Priority

Zendesk Support

Created September 22, 2016 at 8:31 PM
Updated June 25, 2023 at 11:49 PM
Resolved October 20, 2016 at 7:59 PM
Loading...