Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS] LPS-188466 importing fragments with global scoped sitenavmenu fails #5514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GaborKomaromi
Copy link
Member

Hi Team,

Could you please review this pull request?
https://liferay.atlassian.net/browse/LPS-188466
Thank you!


Reproduction Steps:

  1. 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/)
  2. Go to Control Panel --> Sites --> Sites and create a blank site
  3. 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"

        }

      ]

    }

  ]

}

  1. 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.

  2. Go to Publishing --> Export and export the Site and download the LAR.

  3. 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.

@ealonso
Copy link
Member

ealonso commented Jun 27, 2023

Hey @GaborKomaromi,

You should send this one to @liferay-echo user.

@gergelyszalay
Copy link
Member

moved this PR to liferay-echo#12601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants