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

Site Template export does not include DL files causing NullPointerException during import

    Details

      Description

      Reproduction steps

      1. Go to Control Panel -> Sites -> Site Templates
      2. Delete all existing Site Templates
      3. Add a new Site Template with the name "test"
      4. Open the "test" Site Template
      5. Content -> Documents and Media
      6. Add a sample file
      7. Go back to Control Panel -> Sites -> Site Templates
      8. Three dots, Export/Import
      9. Export
      10. Delete the "test" template
      11. Three dots, Export/Import
      12. Import tab
      13. Import the previously exported Site Template LAR

      Expected behavior: LAR is imported successfully

      Actual behavior:
      An unexpected error occurred with the publication process. Please check your portal and publishing configuration.

      The following error in Documents and Media while importing its data has stopped the process: java.lang.NullPointerException

      Log on master:

      12:18:47,040 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.NullPointerException
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:422)
              at com.liferay.document.library.internal.exportimport.data.handler.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:184)
              at com.liferay.document.library.internal.exportimport.data.handler.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:99)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:428)
              at com.liferay.document.library.web.lar.DLPortletDataHandler.doImportData(DLPortletDataHandler.java:252)
              at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:378)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:333)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:282)
              at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.importSitePortlets(StagedGroupStagedModelDataHandler.java:602)
              at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:329)
              at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:88)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:371)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:428)
              at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:576)
              at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:218)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:217)
      

       

      Reproduced

      Reproduced on DE-22
      Reproduced on 7.0.x-private @ 2844d86d2359221510c956512edad60cd541c0e6
      Reproduced on master @ c53b79ebb1c70b4a9675e12e8f211c8ef35b3062
      Reproduced on ee-6.2.x @ 1b218846ec53adee7d5f66cac7cb43699ad2e355

        Attachments

          Activity

            People

            Assignee:
            hong.zhao Hong Zhao
            Reporter:
            amadea.fejes Amadea Fejes (Inactive)
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 51 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP33
                7.0.0 DXP SP7
                7.0.5 CE GA6
                7.0.X
                Master