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

Velocity portlet preferences not set in database after installing hotfix

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 7.0.0 M7
    • Fix Version/s: 7.0.0 M7
    • Component/s: Liferay Themes
    • Labels:
      None

      Description

      DESCRIPTION
      We are seeing an issue where the portlet preferences are not being set (persisted in database either) when having a portlet embedded in the theme. This was working prior to hotfix-10946. I have attached a testing theme to demonstrate the issue. We only see preferences in the database AFTER opening up the portlets configuration panel, but it is also incomplete.

      Velocity code for embedding Web Content Display portlet:

      #if ($has_navigation || $is_signed_in)
      	    #set ($my_portlet_id = '56_INSTANCE_TEST1')
                  #set ($VOID = $velocityPortletPreferences.setValue('display-style', '1'))
                  #set ($locPlidLong = $getterUtil.getLong($plid))	
                  #set ($locPortletPreferenceService = $serviceLocator.findService("com.liferay.portal.service.PortletPreferencesLocalService"))	
                  #set ($VOID = $velocityPortletPreferences.setValue('portletSetupShowBorders', false))  
                  $theme.runtime($my_portlet_id, '', $velocityPortletPreferences.toString())
                  #set ($VOID = $velocityPortletPreferences.reset())
      	    #parse ("$full_templates_path/navigation.vm")
      #end

      STEPS TO REPRODUCE
      1) Install hotfix-10946
      2) Start server
      3) Go to the default site.
      4) Add a "Page"
      5) Deploy and assign the test theme as the theme for the page via page look and feel
      EXPECTED RESULTS
      The setting in the velocity preferences object are stored in database. Should show something like:
      <portlet-preferences><preference><name>display-style</name><value>1</value></preference></portlet-preferences>

      ACTUAL RESULTS
      At first there was no entry in portletpreferences, then after opening the portlet's configuration in the page, the entry was added to the database but the value was <portlet-preferences />.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christopher.kian Christopher Kian
              Reporter:
              christopher.kian Christopher Kian
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 13 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.0 M7