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

Forms - Creating multiple fields with the same "name" causes issues

    Details

      Description

      Steps to Reproduce:

      1. Go to Admin > Content > Forms
      2. Add Form
      3. Input Title "New Form"
      4. Add text field
        1. Name: "text"
        2. Label: "1"
        3. showLablel: "true"
      5. Add Column with another text field
        1. Name: "text"
        2. Label: "2"
        3. showLablel: "true"
      6. Add third text field in the bottom single column row
        1. Name: "text"
        2. Label: "3"
        3. showLablel: "true"
      7. Save Form
      8. Go to Welcome page
      9. Add Form portlet
      10. Select Form > "New Form"
      11. Save
      12. Close configuration
      13. Input all 3 text fields
      14. Send

      Expected Result:
      Each field displays the correct label. Form can be sent without error.

      Actual Result:
      Each field is labeled "3" and error is thrown when Form is sent. Portlet gives message, "Portlet is temporarily unavailable."

      17:27:04,861 ERROR [com.liferay.portal.layoutconfiguration.util.RuntimePageImpl-18][render_portlet_jsp:131] null
      com.liferay.portlet.dynamicdatamapping.StorageFieldValueException: Incorrect number of values set for field text
      	at com.liferay.portlet.dynamicdatamapping.validator.DDMFormValuesValidatorImpl.validateDDMFormFieldValues(DDMFormValuesValidatorImpl.java:202)
      	at com.liferay.portlet.dynamicdatamapping.validator.DDMFormValuesValidatorImpl.traverseDDMFormFields(DDMFormValuesValidatorImpl.java:94)
      	at com.liferay.portlet.dynamicdatamapping.validator.DDMFormValuesValidatorImpl.validate(DDMFormValuesValidatorImpl.java:47)
      	at com.liferay.portlet.dynamicdatamapping.validator.DDMFormValuesValidatorUtil.validate(DDMFormValuesValidatorUtil.java:39)
      	at com.liferay.portlet.dynamicdatamapping.storage.BaseStorageAdapter.validateDDMFormValues(BaseStorageAdapter.java:157)
      	at com.liferay.portlet.dynamicdatamapping.storage.BaseStorageAdapter.create(BaseStorageAdapter.java:39)
      	at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineImpl.create(StorageEngineImpl.java:40)
      	at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil.create(StorageEngineUtil.java:31)
      	at com.liferay.dynamic.data.lists.service.impl.DDLRecordLocalServiceImpl.addRecord(DDLRecordLocalServiceImpl.java:100)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:149)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:95)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:38)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.liferay.dynamic.data.lists.service.impl.DDLRecordServiceImpl.addRecord(DDLRecordServiceImpl.java:50)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:149)
      

      Reproduced on:
      Tomcat 7.0.62 + MySQL 5.5.43. Portal master GIT ID: 491066cc707d89bf6f2a1f9d2fb85a2315623d34.

        Attachments

        1. sameName.gif
          107 kB
          Victor Ware
        2. Screenshot 2015-06-30 10.27.36.png
          44 kB
          Victor Ware

          Issue Links

            Activity

              People

              Assignee:
              victor.ware Victor Ware
              Reporter:
              victor.ware Victor Ware
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 17 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 M7