Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-63436

Liferay Portal site admin theme selector does not apply default color scheme

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 6.2.5 CE GA6, 6.2.10 EE GA1
    • Fix Version/s: 6.2.X EE, 7.0.0 M3
    • Component/s: Themes
    • Labels:

      Description

      Issue

      Liferay Portal site admin theme selector always chooses default colour scheme for theme by name, not by colour scheme ID, hence incorrect default theme is applied when theme is applied.

      Test Case

      Test Case Purpose

      Show the default color scheme is not selected (as expected) when a theme (containing color schemes) is applied.

      We will toggle between a sample theme and the Classic theme to exhibit the default color scheme selection issue.

      Test Case Steps

      1/ Install Liferay Portal 6.2 CE or EE + Apache Tomcat bundle

      2/ Start portal

      3/ Configure portal using setup wizard

      4/ Sign in as test user

      5/ Download and install any Liferay Portal 6.2 compatible theme

      e.g.

      • NOTE: We will refer to the new theme as NEW-SAMPLE-THEME)
      • NOTE: Many sample themes available from Liferay Marketplace or the Liferay Portal community.

      6/ Navigate to Dockbar > Admin > (Site Administration) > Pages

      7/ Select NEW-SAMPLE-THEME theme

      8/ Click Save button to apply NEW-SAMPLE-THEME theme to pages

      9/ Select Classic theme

      10/ Click Save button to apply Classic theme to pages

      11/ Review outcomes

      11.1/ Expected Outcome

      Default color scheme is applied.

      11.2 Actual Outcome

      Dark color scheme is applied.

      12/ Test case FAIL

      Review

      The Default color scheme has name "Default" and scheme id "01".

      The Dark color scheme has name "Dark" and scheme id "02".

      Based on the test case and observed behaviour, the color schemes as sorted according to their name, not their scheme ID, resulting in the selection of color scheme "Dark", not "Default", as expected.

      Sample Liferay Portal 6.2 look and feel definition file (liferay-look-and-feel.xml)

      FILE: liferay-portal-6.2.10.1-ee-ga1/tomcat/webapps/ROOT/WEB-INF/liferay-look-and-feel.xml

      <?xml version="1.0"?>
      <!DOCTYPE look-and-feel PUBLIC "-//Liferay//DTD Look and Feel 6.2.0//EN" "http://www.liferay.com/dtd/liferay-look-and-feel_6_2_0.dtd">
      
      <look-and-feel>
              <compatibility>
                      <version>6.2.0+</version>
              </compatibility>
              <company-limit>
                        <!-- ... -->                        
              </company-limit>
              <theme id="classic" name="Classic">
                      <root-path>/html/themes/classic</root-path>
                      <templates-path>${root-path}/templates</templates-path>
                      <images-path>${root-path}/images</images-path>
                      <template-extension>vm</template-extension>
                      <settings>             
                        <!-- ... -->                        
                      </settings>
                      <!-- ... -->
                      <color-scheme id="01" name="Default">
                              <css-class&gt;default</css-class&gt;
                              <color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
                      </color-scheme>
                      <color-scheme id="02" name="Dark">
                              <css-class&gt;dark</css-class&gt;
                      </color-scheme>
                      <color-scheme id="03" name="Light">
                              <css-class&gt;light</css-class&gt;
                      </color-scheme>
              </theme>
                     <!-- ... -->
      </look-and-feel>
      

      Actions

      • Review theme color sorting and selection logic to apply default theme according to scheme ID, not scheme name.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 20 weeks ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M3