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

Cannot export/import blog entries into a site with multiple entries with same title in source/target

Details

    Description

      Steps to Reproduce:

      1. Create a site named "Site1".
      2. Create a site named "Site2".
      3. Select "Site1" as current site.
      4. From Product Menu > Content > Blogs > Add blogs create an entry with title: "title" and content: "content".
      5. From Product Menu > Content > Blogs > Add blogs create an entry with title: "title" and content: "content".
      6. Select "Site2" as current site.
      7. From Product Menu > Content > Blogs > Add blogs create an entry with title: "title" and content: "content".
      8. Fom Blogs (in site "Site1"), click on vertical ellipsis on top right > Export/Import > Export LAR file with the new blog entries (default settings).
      9. Select "Site2" as current site.
      10. From Blogs Import LAR file from step 8.

       

      Expected Result:

      Import should be successful.

       

      Actual Result:

      Import fails with an exception like the following one:

      2021-02-26 19:58:51.814 DEBUG [liferay/background_task-1][LoggerExportImportLifecycleListener:436] Staged model {class: com.liferay.blogs.model.BlogsEntry, groupId: 763443, uuid: 1e74e8f1-6cd2-bfd4-6e22-f89d8874d0cd} import failed
      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.liferay.blogs.model.impl.BlogsEntryImpl#32527972]
      	at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1950)
      	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2595)
      	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495)
      	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822)
      	at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
      	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      	at com.liferay.portal.spring.hibernate.PortletTransactionManager$TransactionStatusWrapper.reset(PortletTransactionManager.java:260)
      	at com.liferay.portal.spring.hibernate.PortletTransactionManager.rollback(PortletTransactionManager.java:145)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.rollback(DefaultTransactionExecutor.java:85)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:72)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.kernel.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:64)
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      	at com.sun.proxy.$Proxy641.addEntry(Unknown Source)
      	at com.liferay.blogs.internal.exportimport.data.handler.BlogsEntryStagedModelDataHandler.doImportStagedModel(BlogsEntryStagedModelDataHandler.java:270)
      
      

      Attachments

        Activity

          People

            yvonne.han Yvonne Han
            mariano.alvaro Mariano Álvaro
            Austin Chiang Austin Chiang
            Mariano Álvaro Mariano Álvaro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 11 weeks, 5 days ago

              Packages

                Version Package
                7.1.10 DXP FP23
                7.1.10.6 SP6
                7.1.X
                7.2.10 DXP FP12
                7.2.X
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.0 CE GA1 DXP 7,4
                7.4.13 DXP GA1
                Master