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

Pressing enter when setting date range on export of pages will submit form without validation

    Details

      Description

      Short description: When setting a date range for the content to be exported, setting the start date to later than present causes an exception in tomcat instead of a warning in the UI.

      Steps to Reproduce:
      1. Go to Admin > Pages. Choose Export.
      2. Select "Choose Content" > Date Range > "Change".
      3. Select "Date Range" and then set the start date to a day that is after the end date (an invalid date range).
      4. With the "End Date" field active/highlighted, press Enter.

      Expected Result:
      User would receive the "Selected dates cannot be in the future" error that would normally occurr when clicking "OK".

      Actual Result:
      The form is submitted and the export fails with a stack trace.

      13:05:19,435 ERROR [http-bio-8080-exec-4][IncludeTag:129] Current URL /group/control_panel/manage?p_auth=DA5XWZlz&p_p_auth=nxtc6sAP&p_p_id=156&p_p_lifecycle=1&p_p_state=m
      aximized&p_p_mode=view&doAsGroupId=10185&refererPlid=10188&controlPanelCategory=current_site.content&_156_exportLAR=true&_156_struts_action=%2Fgroup_pages%2Fexport_layout
      s generates exception: com.liferay.portal.kernel.lar.PortletDataException
      com.liferay.portal.kernel.lar.PortletDataException
              at com.liferay.portal.lar.PortletDataContextFactoryImpl.validateDateRange(PortletDataContextFactoryImpl.java:257)
              at com.liferay.portal.lar.PortletDataContextFactoryImpl.createPreparePortletDataContext(PortletDataContextFactoryImpl.java:139)
              at com.liferay.portal.kernel.lar.PortletDataContextFactoryUtil.createPreparePortletDataContext(PortletDataContextFactoryUtil.java:62)
              at org.apache.jsp.html.taglib.staging.content.page_jsp._jspService(page_jsp.java:657)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
              at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:294)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
              at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83)
              at org.apache.jsp.html.portlet.layouts_005fadmin.export_005flayouts_jsp._jspService(export_005flayouts_jsp.java:1442)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
              at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:294)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
      
      

      Reproduced on master - 827d2f3

        Attachments

        1. fixed.png
          fixed.png
          25 kB
        2. reproduced.png
          reproduced.png
          27 kB

          Issue Links

            Activity

              People

              Assignee:
              joyce.wang Joyce Wang
              Reporter:
              bryan.engler Bryan Engler
              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:
                6 years, 8 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M2