Affects Version/s: 7.0.X EE, Master
Component/s: Database Upgrade Framework
When trying to find all the portlets inside of a Layout's typeSettings, the upgrade process falsely assumes that every portlet will be contained inside of a div whose id is prefixed with "column-". While it is true that all of Liferay's layout templates only use divs whose ids are prefixed with "column-", we cannot assume the same is true for everyone's custom layout templates.
If you have a custom layout template with div ids that are not prefixed with "column-" in 6.2 or earlier, then when upgrading to DXP, any portlets that you have in those divs will not have their portletIds upgraded. This causes those portlets to no longer be displayed on the page.
Steps to Reproduce
- Start 6.2 and deploy the attached test_layout.war.
- Log in as the admin user.
- Add a page using the "Test Layout" template.
- Add some portlets on the page
- Stop Liferay
- Upgrade to Liferay 7. Notice that there are no errors relevant to this bug displayed during the upgrade process.
- Download the "test_layout (master 70x).war", rename it to "test_layout.war", and stick it in your Liferay 7 instance's deploy folder.
- Start up DXP and go to the page that you added that has the Test Layout template.
Expected Result: All of the portlets you added to that page would still be there.
Actual Result: The portlets that you added to that page all have weird names (along the lines of "56_INSTANCE_P2kP74T59v1a"), and say that they have been undeployed.
Reproduced in master (c01b925d9567bef8540f9b7d14ae43784fcf1ff4)
Reproduced in ee-7.0.x (1355c8db562a1c06405ea940cca5141e9faa93e3)