liferay-portal
liferay-portal copied to clipboard
[TS] LPS-188466 importing fragments with global scoped sitenavmenu fails
Hi Team,
Could you please review this pull request? https://liferay.atlassian.net/browse/LPS-188466 Thank you!
Reproduction Steps:
- Go to the Global Site --> Site Builder --> Navigation menus and add a navigation menu and add to it a URL element (http://www.google.com/)
- Go to Control Panel --> Sites --> Sites and create a blank site
- On the Site, go to Design --> Fragments and add a fragment set then create a basic fragment and change its configuration by pasting the following:
{
"fieldSets": [
{
"label": "",
"fields": [
{
"name": "source",
"description": "",
"label": "Source",
"type": "navigationMenuSelector"
}
]
},
{
"configurationRole": "style",
"label": "",
"fields": [
{
"name": "hoveredItemColor",
"description": "",
"label": "Couleur de lélément survolé",
"type": "colorPicker"
},
{
"name": "selectedItemColor",
"description": "",
"label": "Couleur de lélément sélectionné",
"type": "colorPicker"
}
]
}
]
}
-
Go to Site Builder --> Pages and add a content (blank) page and add the created fragment to it, then click the fragment (it is so thin to be noticed). Change the “Pages Hierarchy” source by selecting the created navigation menu and then click on “Select this level”, then publish the page.
-
Go to Publishing --> Export and export the Site and download the LAR.
-
Go to Publishing --> Import and import the LAR into the same site.
Expected Result:* The import is successful with no issues. Actual Result: The import fails with a UI error:
An unexpected error occurred with the publish process. Please check your portal and publishing configuration.
java.lang.UnsupportedOperationException
Solution: If there's a reference from a regular site to the global (or basically any other) site, they will be exported as "missing reference". This was not handled in case of the SiteNavigationMenus, so I implemented doImportMissingReference method to do so.
Hey @GaborKomaromi,
You should send this one to @liferay-echo user.
moved this PR to https://github.com/liferay-echo/liferay-portal/pull/12601