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

No validation for correct ClassNameId in FragmentEntryLink, breaking FragmentEntryLink viewUsages if classNameId is invalid

    Details

      Description

      Description
      Many times we assume the classNameId / classPK pair is correct when creating FragmentEntryLinks. It seems like better practice to validate that the classNameId / classPK pair is valid upon creation to prevent unexpected errors further down the road.

      Steps to Reproduce

      1. Create a FragmentEntryLink with invalid classNameid / classPK combo (remote or local service), but with a valid FragmentEntryId as a reference.
      2. Check Usages for the Fragment Entry or Publish the Fragment Entry Link to live site

      Expected Result
      FragmentEntryLink not even allowed to be added with invalid classNameId/classPK in the first place

      Actual Result
      Because we tried fetching the FragmentEntryLink's className id / classPK and failed, we got an exception thrown

      Tested on Tomcat 9.0.10 + MySQL 5.7
      Portal master GIT ID: 826a5b06994aa6d1cd2f0afc79023ad7e44f627b

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                46 weeks, 1 day ago

                Packages

                Version Package
                7.2.10 DXP FP1
                7.2.X
                7.2.1 CE GA2
                Master