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

Web Content - Adding a Web Content with a repeatable Image field throws console error and error in UI

    Details

      Description

      Steps to reproduce:

      1. Go to > Control Panel > Web Content
      2. Add a Structure (st1) with an Image field
        • Add a Template based on st1
      3. Add another Structure (st2) with an Image field (this time make it repeatable)
        • Add a Template based on st2
          • Note that the Template Editor helper tool produces the same template script for each structure (though there is an asterisk by the field that is marked as repeatable (see "Asterisked..." screenshot))
             <img alt="Image" src="${image1808.getData()}" /> 
      4. Create 'wc1' based on st1 > Upload an image > Publish
        • Assert wc1 displays with image in a WCD
      5. Create 'wc2' based on st2 > Upload an image (only one) > Publish

      Expected result:
      wc2 will publish with one image.

      Actual result:
      Console throws error below and UI displays an error (see "Unavailable..." screenshot).

      Note: the same thing happens when repeating the field and uploading two files

      18:47:45,385 ERROR [http-bio-8080-exec-5][render_portlet_jsp:154] java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String
              at com.liferay.portlet.journal.action.EditArticleAction.getImages(EditArticleAction.java:444)
              at com.liferay.portlet.journal.action.EditArticleAction.updateArticle(EditArticleAction.java:653)
              at com.liferay.portlet.journal.action.EditArticleAction.processAction(EditArticleAction.java:147)
              at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:171)
              at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:216)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:605)
              at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:636)
              at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:303)
              at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:514)
              at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:119)
              at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:86)
              at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:54)
              at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:73)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:114)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:356)
              at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:179)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:81)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.wulbern Brian Wulbern
                Reporter:
                brian.wulbern Brian Wulbern
                Participants of an Issue:
                Recent user:
                Marta Elicegui
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  7 years, 22 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.0 CE M6