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

Virtual hostname max length is not validated

    Details

      Description

      Steps to reproduce

      1. Choose a site -> Configuration -> Site Settings -> General tab -> Site URL section
      2. In Public Pages input and/or Private Pages input a string of any length can be entered (i.e. longer than Virtualhost.hostname column definition)

      Observed result

      Entered data can not be managed by system and an exception is thrown:

      08:30:47,736 ERROR [http-nio-9080-exec-5][JDBCExceptionReporter:234] ERROR: el valor es demasiado largo para el tipo character varying(75) 
      08:30:47,750 ERROR [http-nio-9080-exec-5][PortletServlet:112] javax.portlet.PortletException: org.springframework.dao.DataIntegrityViolationException: could not update: [com.liferay.portal.model.impl.VirtualHostImpl#35213]; SQL [update VirtualHost set mvccVersion=?, hostname=? where virtualHostId=? and mvccVersion=?]; nested exception is org.hibernate.exception.DataException: could not update: [com.liferay.portal.model.impl.VirtualHostImpl#35213] 
      javax.portlet.PortletException: org.springframework.dao.DataIntegrityViolationException: could not update: [com.liferay.portal.model.impl.VirtualHostImpl#35213]; SQL [update VirtualHost set mvccVersion=?, hostname=? where virtualHostId=? and mvccVersion=?]; nested exception is org.hibernate.exception.DataException: could not update: [com.liferay.portal.model.impl.VirtualHostImpl#35213] 
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:203) 
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:418) 
      	at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:93) 
      	at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:260) 
      	at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71) 
      	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48) 
      ....
      ....
      ....
      

      An error message is showed:
      Portlet is temporarily unavailable.

      Expected result
      A max length validation should be used with this value, similar to
      Control Panel -> Configuration -> Instance Settings -> Configuration tab -> Virtual Host input

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 20 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP31
                  7.0.5 CE GA6
                  7.0.X
                  7.1.X
                  Master