LPS-42222

Hey Ray,

I changed the behavior so it considers the VirtualLayouts when we're trying to get the page if there is no friendlyURL (basically when we access to http://localhost:8080/web/test1 where test1 is the screen name of a user).


The second thing is that when calling getLayouts, the LayoutLocalServiceVirtualLayoutsAdvice merges the site template if it's necessary and returns all the layouts considering VirtualLayouts. When you call again the same method getLayouts it won't return the VirtualLayouts because the threadLocal MergeLayoutPrototypesThreadLocal determines that the merge is complete).

This behavior is not good enough because the VirtualLayouts are never copied if the portal.property USER_GROUPS_COPY_LAYOUTS_TO_USER_PERSONAL_SITE is false (as it is by default). So, for the case of a user personal site if that property is false we should still do the merge and return all the layouts considering VirtualLayouts.