Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[TECHNICAL-SUPPOR] LPS-26805 Nested-portlets missing from merge #202

Closed
wants to merge 1 commit into from

3 participants

@danielkocsis

Hi Juan,

This PR is about to fix the issue when you add new member to a group and during merge layouts the portlets inside on a nested-portlet will be missing from the result page. The original issue occurs on 6.0.x only but the code exists on trunk as-is, the only difference is now we handle merging sites differently. With using parameter:

user.groups.copy.layouts.to.user.personal.site=true

you can force the portal to use the old way, so you can reproduce the problem on trunk as well. As the comment above this param says it is a deprecated behavior now, but as we discussed the method we need to fix here is really not deprecated, so it is possible to reproduce the problem any time if somebody just calls this method from his code.

Thanks,
Daniel

@juanferrub juanferrub closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 23, 2012
  1. @moltam89
This page is out of date. Refresh to see the latest.
Showing with 17 additions and 0 deletions.
  1. +17 −0 portal-impl/src/com/liferay/portal/lar/LayoutImporter.java
View
17 portal-impl/src/com/liferay/portal/lar/LayoutImporter.java
@@ -1394,6 +1394,23 @@ protected void mergePortlets(
LayoutTypePortletConstants.LAYOUT_TEMPLATE_ID,
layoutTemplateId);
+ String nestedColumnIds = newTypeSettingsProperties.getProperty(
+ LayoutTypePortletConstants.NESTED_COLUMN_IDS, StringPool.BLANK);
+
+ if (!nestedColumnIds.equals(StringPool.BLANK)) {
+ previousTypeSettingsProperties.setProperty(
+ LayoutTypePortletConstants.NESTED_COLUMN_IDS,
+ nestedColumnIds);
+
+ for (String nestedColumnId :
+ StringUtil.split(nestedColumnIds)) {
+
+ previousTypeSettingsProperties.setProperty(
+ nestedColumnId,
+ newTypeSettingsProperties.getProperty(nestedColumnId));
+ }
+ }
+
LayoutTemplate newLayoutTemplate =
LayoutTemplateLocalServiceUtil.getLayoutTemplate(
layoutTemplateId, false, null);
Something went wrong with that request. Please try again.