hhuijser/liferay-portal — pull request #198 by matthewkong (2011-10-08 01:05:59+00:00)
Title: LPS-21905

Hey Hugo, I'm not sure if this is the best fix or not. The problem is in ServicePreAction.addDefaultUserPrivateLayoutByProperties. We are adding a new Layout layout but calling layout.getLayoutSet() gives you a layoutSet with 0 pages. The idea behind this fix is to make that return the correct value.

However, an alternate fix would be much easier. So instead of:
LayoutSet layoutSet = layout.getLayoutSet();
Which is grabbing the layoutSet from the newly created layout.

We can do this:
LayoutSet layoutSet = LayoutSetLocalServiceUtil.getLayoutSet(groupId, true);
We're grabbing the layoutSet from the database.

Anyways, let me know what you think. Thanks!