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

Importing a LAR file that contains a Form fails when a required page in a Form submission has been skipped

    Details

      Description

      Description

      Importing a LAR file that contains a Form fails when a required page in a Form submission has been skipped.

      Steps to reproduce

      1) Go to Content > Forms
      2) Create a new Form by clicking on the '+' button in the top right-hand corner, and give it the title 'Test Form'
      3) Add a required Single Selection field with label 'Skip next page?' and options 'Yes' and 'No' (if the side bar containing Form elements is not shown, click on the '+' button on the upper right corner of the page)
      4) Add a new page by clicking on the kebab on the upper right corner of the Form and select Add New Page
      5) Add a required Text field to this new Page with label 'Text 1'
      6) Add another new Page and add a required Text field to it with label 'Text 2', and click Save Form
      7) Click on the Rules tab on the top of the page next to Form
      8) Create a new Rule by clicking on the '+' button in the top right-hand corner
      9) In the Condition section, select the following from the dropdown menus: If 'Skip next page?' 'Is equal to' 'Value' 'Yes'
      10) In the Actions section, select the following from the dropdown menus: Do 'Jump to Page' '3'
      11) Click 'Save' while still on the Rules page
      12) Click on the Form tab at the top of the page and then click 'Publish Form'
      13) Once published, go to the Home page and add a Form widget to the page.
      14) Click Select Form in the portlet and select 'Test Form' as the form to use.  Click Save and close the popup.
      15) Select 'Yes' when asked to skip next page.
      16) Fill out the rest of the Form and then submit it.
      17) Go to Content > Forms
      18) Export the form by clicking the kebab menu in the upper right corner of the page and selecting the Export/Import option.
      19) Once the export pop up shows, ensure that all content including "Form Entries" is selected.
      20) Select Export and download the LAR file that was just exported.
      21) Go back to Content > Forms
      22) Delete the 'Test Form' form
      23) Import the LAR file that was just exported by clicking the kebab menu in the upper right corner of the page and selecting the Export/Import option
      24) Click on the Import tab at the top of the popup and then click Select File
      25) Select the LAR file that was exported and downloaded, and then click Continue
      26) Click Import (leave any settings and options as the default values)

      Results of Testing

       Expected Result: The lar imports correctly
       Actual Result: The import fails with an error message: 'No value defined for field name Text1'

      Errors/Logs

      UI Error:

      An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
      The Form Record 70931b89-19ce-9603-01fc-def68a2418da could not be imported because of the following error: No value defined for field name Text1.

      Terminal Error:

      2018-10-02 18:45:22.876 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:168] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: No value defined for field name Text1
      at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:433)
      at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:459)
      at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:445)
      at com.liferay.dynamic.data.mapping.form.web.internal.exportimport.data.handler.DDMFormAdminPortletDataHandler.doImportData(DDMFormAdminPortletDataHandler.java:193)
      at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:383)
      at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:415)
      at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:346)
      at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.doImportPortletInfo(PortletImportControllerImpl.java:1101)
      at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importFile(PortletImportControllerImpl.java:299)
      at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:462)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:156)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:139)
      at com.sun.proxy.$Proxy141.importPortletInfo(Unknown Source)
      at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:186)
      at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:138)
      at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:124)
      at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:100)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)
      at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:46)
      at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
      at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:88)
      at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
      at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
      at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:75)
      at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:127)
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.dynamic.data.mapping.validator.DDMFormValuesValidationException$RequiredValue: No value defined for field name Text1
      at com.liferay.dynamic.data.mapping.validator.internal.DDMFormValuesValidatorImpl.validateDDMFormFieldValue(DDMFormValuesValidatorImpl.java:345)
      at com.liferay.dynamic.data.mapping.validator.internal.DDMFormValuesValidatorImpl.validateDDMFormFieldValue(DDMFormValuesValidatorImpl.java:317)
      at com.liferay.dynamic.data.mapping.validator.internal.DDMFormValuesValidatorImpl.traverseDDMFormFieldValues(DDMFormValuesValidatorImpl.java:268)
      at com.liferay.dynamic.data.mapping.validator.internal.DDMFormValuesValidatorImpl.validate(DDMFormValuesValidatorImpl.java:79)
      at com.liferay.dynamic.data.mapping.service.impl.DDMFormInstanceRecordLocalServiceImpl.validate(DDMFormInstanceRecordLocalServiceImpl.java:870)
      at com.liferay.dynamic.data.mapping.service.impl.DDMFormInstanceRecordLocalServiceImpl.createDDMContent(DDMFormInstanceRecordLocalServiceImpl.java:569)
      at com.liferay.dynamic.data.mapping.service.impl.DDMFormInstanceRecordLocalServiceImpl.addFormInstanceRecord(DDMFormInstanceRecordLocalServiceImpl.java:120)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:156)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:133)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:139)
      at com.sun.proxy.$Proxy484.addFormInstanceRecord(Unknown Source)
      at com.liferay.dynamic.data.mapping.exportimport.staged.model.repository.DDMFormInstanceRecordStagedModelRepository.addStagedModel(DDMFormInstanceRecordStagedModelRepository.java:86)
      at com.liferay.dynamic.data.mapping.internal.exportimport.data.handler.DDMFormInstanceRecordStagedModelDataHandler.doImportStagedModel(DDMFormInstanceRecordStagedModelDataHandler.java:153)
      at com.liferay.dynamic.data.mapping.internal.exportimport.data.handler.DDMFormInstanceRecordStagedModelDataHandler.doImportStagedModel(DDMFormInstanceRecordStagedModelDataHandler.java:54)
      at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
      ... 41 more
      

      Master

      Reproduced: 6cea080d0b4fbee2a08e2736819cad732337b5f0

      Branch

      Reproduced: 61ad20e11088a28bb1c2771fa7446eba5a009522

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package
                7.1.10 DXP FP4
                7.1.10.1 SP1
                7.1.2 CE GA3
                7.1.X
                Master