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

LAR/Staging process stops and exception "java.lang.IllegalArgumentException: . is not a hex char" is thrown in case of a web content with invalid link to document library

    Details

      Description

      LAR/Staging process stops and exception java.lang.IllegalArgumentException: . is not a hex char is thrown in case of a webcontent with invalid link to document library

      This bug cannot be reproduced in 7.0 or master because a new validation was added during webcontent creation.

      Steps to reproduce

      1. Create a site
      2. Create a webcontent and click on edit source
      3. Add following invalid image:
        <img alt="" src="/documents/365204/0/error%.jpg" style="height: 100px; width: 100px;" />
        
      4. Go to staging configuration and activate Staging Local:
      5. - Expected behavior: Staging activation is executed correctly
      6. - Wrong behavior: Staging activation fails
        Caused by: java.lang.IllegalArgumentException: . is not a hex char
                at com.liferay.portal.kernel.util.URLCodec._charToHex(URLCodec.java:268)
                at com.liferay.portal.kernel.util.URLCodec._getEncodedByteBuffer(URLCodec.java:293)
                at com.liferay.portal.kernel.util.URLCodec.decodeURL(URLCodec.java:71)
                at com.liferay.portal.util.HttpImpl.decodeURL(HttpImpl.java:270)
                at com.liferay.portal.util.HttpImpl.decodeURL(HttpImpl.java:261)
                at com.liferay.portal.kernel.util.HttpUtil.decodeURL(HttpUtil.java:68)
                at com.liferay.portal.lar.ExportImportHelperImpl.getDLReferenceParameters(ExportImportHelperImpl.java:1721)
                at com.liferay.portal.lar.ExportImportHelperImpl.replaceExportDLReferences(ExportImportHelperImpl.java:683)
                at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceExportDLReferences(ExportImportHelperUtil.java:169)
                at com.liferay.portal.lar.ExportImportHelperImpl.replaceExportContentReferences(ExportImportHelperImpl.java:618)
                at com.liferay.portal.kernel.lar.ExportImportHelperUtil.replaceExportContentReferences(ExportImportHelperUtil.java:158)
                at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doExportStagedModel(JournalArticleStagedModelDataHandler.java:346)
                at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doExportStagedModel(JournalArticleStagedModelDataHandler.java:1)
                at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:69)
                ... 40 more
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              linda.sui Linda Sui
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 21 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE