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

BaseTextExportImportProcessor.validateLayoutReferences method parses URLs ending in a slash incorrectly, always resulting in a NoSuchLayoutException

    Details

      Description

      Description
      The BaseTextExportImportProcessor.validateLayoutReferences method parses URLs ending in a forward slash incorrectly. If it detects a URL ending in a forward slash, then that URL will result in a NoSuchLayoutException.

      Steps to Reproduce

      1. Start up Liferay on a fresh database and log in as the admin user.
      2. Navigate to Liferay > Content > Web Content > + (Add Button) > Basic Web Content.
      3. Give it a title (it doesn't matter what the title is).
      4. Switch the "Content" field to Code view.
      5. Paste the following HTML into the "Content" field:
        <p><span><a href="http://localhost:8080/web/guest/home/">text</a></span></p>
        
      6. Click on the Submit button

      Expected result: The web content article is successfully added with no errors.
      Actual result: An error appears in the UI: "The content references a missing page." The web content article is not added.

      Reproduced in
      master (3bec09301a5e7610b1ddfade873c18e38e8c2637)
      ee-7.0.x (c4abd9aafb206ad0676927c27fb4acbe99f1ddb9)

        Attachments

          Activity

            People

            • Assignee:
              lu.liu Lu Liu
              Reporter:
              michael.bowerman Michael Bowerman (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 14 weeks, 1 day ago

                Packages

                Version Package
                7.0.0 DXP FP14
                7.0.0 DXP SP3
                7.0.3 CE GA4
                7.0.X EE
                7.1.X
                Master