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

Add back-end validation for Wiki page title lentgh

    Details

      Description

      Steps to reproduce:

      1. Add a Wiki Page
      2. Set title with 256 characters:
        1234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234567891234
        
      3. Publish Wiki page
        Expected Result: error message that the title is too long (or a validation on the UI before even publishing the page
        Actual Result: Form is re-rendered without an error message on the UI, with stack trace shown in Tomcat log, indicating that the validation fails at the database insert level.
      2018-01-18 12:10:37.575 ERROR [http-apr-8080-exec-2][JDBCExceptionReporter:234] Data truncation: Data too long for column 'title' at row 1
      2018-01-18 12:10:37.585 ERROR [http-apr-8080-exec-2][JDBCExceptionReporter:234] Data truncation: Data too long for column 'title' at row 1
      2018-01-18 12:10:37.595 ERROR [http-apr-8080-exec-2][PortletServlet:112] javax.portlet.PortletException: org.hibernate.exception.DataException: Could not execute JDBC batch update
      javax.portlet.PortletException: org.hibernate.exception.DataException: Could not execute JDBC batch update
              at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand.processAction(BaseMVCActionCommand.java:69)
      ...
      
      1. Remove the last character from the title:
        123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123
        
      2. Publish Wiki page
        Result: Successful page creation.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 42 weeks ago

                Packages

                Version Package
                7.0.0 DXP FP40
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                7.1.0 M1
                7.1.X
                Master