Root Folder in Display Settings of Documents and Media Portlet Resets to Blank After Upgrading From Portal 6.1 to Portal 6.2

After upgrading to Liferay Portal 6.2, the Root Folder selection in Documents and Media → Display Settings has been reset to default instead of keeping the folder that was chosen in the Liferay Portal version prior to the upgrade.

Steps to Reproduce

  1. In Portal 6.1 EE GA2, add a new Page titled Test Page.
  2. Add a Documents and Media Portlet onto the Page.
  3. Create a new folder called Test Folder.
  4. In the Documents and Media Portlet, select the Wrench → Configuration. In the dialog box that opens, choose a new Folder Test Folder to be the Root Folder under the Display Settings tab.
  5. Upgrade to Portal 6.2.
  6. Navigate to Test Page.
  7. Click the Wrench icon in the Documents and Media Portlet → Configuration → Display Settings tab.
  8. Observe the value of Root Folder under Display Settings section.
    DisplaySettingsDocLib.png

Expected Behavior:

Test Folder should be selected after upgrading to Liferay Portal 6.2 EE

Actual Behavior:

There are no values under the Root Folder section. See image above.

Resolution

Before Executing the Upgrade:

  1. In the Liferay Portal 6.2 environment, navigate to and open the liferay-portlet.xml file.
  2. Locate the entry for the Documents and Media Portlet. This is portlet-name 20.
  3. Locate the setting  <preferences-unique-per-layout>false</preferences-unique-per-layout> and change the value from false to true.
  4. Save the file.
  5. Execute the upgrade.

Additional Information

See LPS-44389

The reason for this issue is because the default portlet preference settings are different between Portal 6.1 and Portal 6.2.

Portal 6.1:
preferences-unique-per-layout=true (we do not explicitly set this property in liferay-portlet.xml, but we have a default property ,private boolean _preferencesUniquePerLayout = true in PortletImpl.java. )
preferences-owned-by-group=true

Portal 6.2:
preferences-unique-per-layout=false
preferences-owned-by-group=true

Because the property in Portal 6.2 is set to false, the Documents and Media portlet does not retain the portlet preference setting from Portal 6.1.

Was this article helpful?
0 out of 0 found this helpful