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

Collection Display Fragment pagination with pagination type "Numeric" not working on view mode

    Details

      Description

      Steps to reproduce

      1. Create 4 basic web content
      2. Create a Dynamic Collection with All Types
      3. Create a Content Page
      4. Add a Collection Display Fragment for the created collection
      5. Add a Heading fragment and map it to Web Content title
      6. Configure Collection Display Fragment to show Pagination type "Numeric"
      7. Changed the Maximum Number of Items per Page for 2
      8. Publish the content page

      Actual result
      Collection Display Fragment is shown empty

      Expected result
      Collection Display Fragment show the created WC

      Notes

      • It works fine in edit mode
      • It works fine with pagination type "Simple"
      • The following trace is shown:
      2021-10-05 14:44:26.297 ERROR [http-nio-8080-exec-21][IncludeTag:128] Current URL /web/guest/web-contents generates exception: javax.servlet.jsp.JspException: java.lang.ArrayIndexOutOfBoundsException: 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      	at com.liferay.frontend.taglib.clay.servlet.taglib.PaginationBarTag.processStartTag(PaginationBarTag.java:298) ~[bundleFile:?]
      	at com.liferay.frontend.taglib.clay.internal.servlet.taglib.BaseContainerTag.doStartTag(BaseContainerTag.java:67) ~[bundleFile:?]
      	at com.liferay.frontend.taglib.clay.servlet.taglib.PaginationBarTag.doStartTag(PaginationBarTag.java:91) ~[bundleFile:?]
      	at com.liferay.taglib.DirectTag.doTag(DirectTag.java:127) ~[bundleFile:?]
      	at com.liferay.layout.taglib.servlet.taglib.RenderLayoutStructureTag._renderCollectionStyledLayoutStructureItem(RenderLayoutStructureTag.java:333) ~[bundleFile:?]
      	at com.liferay.layout.taglib.servlet.taglib.RenderLayoutStructureTag._renderLayoutStructure(RenderLayoutStructureTag.java:645) ~[bundleFile:?]
      	at com.liferay.layout.taglib.servlet.taglib.RenderLayoutStructureTag.processStartTag(RenderLayoutStructureTag.java:153) ~[bundleFile:?]
      	at com.liferay.taglib.util.IncludeTag.doStartTag(IncludeTag.java:116) ~[bundleFile:?]
      	at org.apache.jsp.render_005ffragment_005flayout.page_jsp._jspService(page_jsp.java:233) ~[?:?]
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) ~[jasper.jar:9.0.53]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet-api.jar:4.0.FR]
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) ~[jasper.jar:9.0.53]
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) ~[jasper.jar:9.0.53]
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) ~[jasper.jar:9.0.53]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet-api.jar:4.0.FR]
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:370) ~[bundleFile:?]
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:382) ~[bundleFile:?]
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) ~[?:?]
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:63) ~[?:?]
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120) ~[?:?]
      

      Reproducible on:

      Tomcat 9.0.53 + MySQL 5.7. Portal master GIT ID: 59bcc8518e827673421d4d4944d9706421d06c70

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              david.gutierrez David Gutiérrez Mesa
              Participants of an Issue:
              Recent user:
              Sophia Zhang
              Engineering Assignee:
              Julien Castelain
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                14 weeks, 6 days ago

                  Packages

                  Version Package
                  7.4.13 DXP GA1
                  7.4.3.4 CE GA4
                  Master