LPS-42057

Hey Hugo,

The issue is that the portlets that are added automatically to the initial layout do not have any portlet preferences stored in the database. So, in the first commit, Preston added in a new listener to run every time the portlets on the layout change which will create the entry in the database and resolve the issue. He calls "PortletPreferencesFactoryUtil.getLayoutPortletSetup" because if there is no entry then it will create one, but it also has other logic within it that we thought best not to extract out.

In the second commit, he reverted a previous "fix" that tried to resolve this same issue but it only worked in certain instances.

Let me know if you have any questions.