Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-128246

Unable to get collection field when select a collection in Collection Display

    Description

    Step to reproduce:

    1. Add a web content based on Basic Web Content
    2. Add a dynamic collection with Web Content Article and All Subtypes
    3. Add a page based on Blank
    4. Add a Collection Display to page
    5. Click the body of Collection Display > General tab
    6. Click the plus button of Collection field > Collections tab > Select the dynamic collection

    Expected Results:
    The title of web content should be shown in Collection Display

    Actual Results:
    The Title is shown in Collection Display. Additionally, the following error is thrown in server console

    2021-02-23 07:29:12.947 ERROR [http-nio-8080-exec-6][GetCollectionFieldMVCResourceCommand:118] Unable to get collection field
    java.lang.RuntimeException: Unable to get class name from id 0
            at com.liferay.portal.util.PortalImpl.getClassName(PortalImpl.java:1637)
            at com.liferay.analytics.reports.web.internal.info.display.contributor.util.LayoutDisplayPageProviderUtil.initLayoutDisplayPageObjectProvider(LayoutDisplayPageProviderUtil.java:48)
            at com.liferay.analytics.reports.web.internal.request.attributes.contributor.AnalyticsReportsInfoDisplayRequestAttributesContributor.addAttributes(AnalyticsReportsInfoDisplayRequestAttributesContributor.java:42)
            at com.liferay.journal.web.internal.info.item.provider.JournalArticleInfoItemFieldValuesProvider.lambda$null$0(JournalArticleInfoItemFieldValuesProvider.java:190)
            at com.liferay.info.field.InfoFieldValue.getValue(InfoFieldValue.java:48)
            at com.liferay.info.field.InfoFieldValue.getValue(InfoFieldValue.java:55)
            at com.liferay.layout.content.page.editor.web.internal.portlet.action.GetCollectionFieldMVCResourceCommand._getDisplayObjectJSONObject(GetCollectionFieldMVCResourceCommand.java:257)
            at com.liferay.layout.content.page.editor.web.internal.portlet.action.GetCollectionFieldMVCResourceCommand._getCollectionFieldsJSONObject(GetCollectionFieldMVCResourceCommand.java:200)
    

    Reproduced on:
    Tomcat 9.0.40 + MySQL 5.7. Portal master-private GIT ID: 09206ef3a03ebcd6b1d9d18a76d736ee4745541a.

    Cannot be reproduced on:
    Tomcat 9.0.40 + MySQL 5.7. Portal master GIT ID: 09206ef3a03ebcd6b1d9d18a76d736ee4745541a.

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            yang.cao Yang Cao
            Participants of an Issue:
            Recent user:
            Yang Cao
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              11 weeks ago

                Packages

                Version Package
                Master