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

Custom values of navigation-menu-web's displayStyle are losed in the upgrade process from 6.1 to 7.0+




      Suppose you have a 6.1 environment with a custom value for the site-navigation-menu-web's displayStyle and you try to upgrade to 7.0+. In that case, the site-navigation-menu-web instances configured with the custom value will lose this configuration. In 7.0, the out-of-the-box values of displayStyle changed, and in the upgrade process, legacy values are changed to the new default value. But it could be interesting that the custom values were maintained to avoid losing this information in the upgrade process.


      The 6.1 legacy value of Site-menu DisplayStyle are:

      • relative-with-breadcrumb
      • from-level-2-with-title
      • from-level-1-with-title,from-level-1
      • from-level-1-to-all-sublevels
      • from-level-0


      Currently in master the values are:

      • ddmTemplate_LIST-MENU-FTL
      • ddmTemplate_NAV-PILLS-FTL
      • ddmTemplate_NAV-PILLS-JUSTIFIED-FTL
      • ddmTemplate_NAV-PILLS-STACKED-FTL
      • ddmTemplate_NAV-TABS-FTL
      • ddmTemplate_NAV-TABS-JUSTIFIED-FTL
      • ddmTemplate_NAVBAR-BLANK-FTL
      • ddmTemplate_NAVBAR-DEFAULT-FTL


      The next steps let you reproduce and test the problem without creating a new custom DisplayStyle to the Navigation plugin in 6.2. These steps simulate the use of a custom DisplayStyle by modifying the data directly in the DDBB.

      Simplified reproduction steps:

      In a 6.2 bundle

      • Create a page and add a Navigation plugin.
      • Configure the Navigation plugin DisplayStyle attribute with the value "From Level 0".
      • In this step, by executing the following SQL, you can simulate the use of a custom DisplayStyle in the Navigation item added in the previous steps. The SQL is :
        update PortletPreferences set preferences = '<portlet-preferences><preference><name>nestedChildren</name><value>1</value></preference><preference><name>includedLayouts</name><value>auto</value></preference><preference><name>rootLayoutLevel</name><value>1</value></preference><preference><name>headerType</name><value>root-layout</value></preference><preference><name>bulletStyle</name><value>dots</value></preference><preference><name>rootLayoutType</name><value>absolute</value></preference><preference><name>displayStyle</name><value>CustomValueDisplayStyle</value></preference></portlet-preferences>'
         where preferences like '%from-level-0%' order by portletPreferencesId desc limit 1;

        In a 7.3 bundle

      • Configure and execute the upgrade database tool:
      • To check if the custom configuration was maintained, execute the following query:
        select * from PortletPreferences where preferences like '%CustomValueDisplayStyle%';


       Expected Value:

      The CustomValueDisplayStyle value is maintained. The previous query returns results.

       Current Value:

      The CustomValueDisplayStyle value is lost and the new default value is set. The previous query doesn't returns results.


          Issue Links



              summer.zhang Summer Zhang
              david.tello David Tello
              Participants of an Issue:
              Recent user:
              Jorge Diaz
              Engineering Assignee:
              David Tello
              0 Vote for this issue
              3 Start watching this issue


                Days since last comment:
                12 weeks, 2 days ago


                  Version Package
                  7.4.13 DXP GA1
         CE GA4