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

Unable to publish to live if the friendlyURL is used for an old version of other content

    Details

      Description

      Steps to reproduce it:

      1. Create a web content with friendlyURL pepe
      2. Activate staging in that site
      3. Update that web content with friendlyURL juan
      4. Publish to Live
      5. Create another web content with friendlyURL pepe
      6. Publish to live

      Expected results:
      You are able to publish to live because there is just friendlyUrl per article (there is no versioning of friendlyURLs)

      Results:
      You are not able to publish to live and you get the following exception:

      2019-01-28 14:24:36.106 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:173] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: {mvccVersion=0, friendlyURLEntryLocalizationId=1, companyId=20099, friendlyURLEntryId=37325, languageId=en_US, urlTitle=pepe, groupId=20126, classNameId=23801, classPK=37316}
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:433)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:456)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
              at com.liferay.exportimport.changeset.web.internal.portlet.data.handler.ChangesetPortletDataHandler.doImportData(ChangesetPortletDataHandler.java:215)
              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.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.importSitePortlets(StagedGroupStagedModelDataHandler.java:599)
              at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:319)
              at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:78)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:456)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
              at com.liferay.exportimport.internal.controller.LayoutImportController.doImportFile(LayoutImportController.java:580)
              at com.liferay.exportimport.internal.controller.LayoutImportController.importFile(LayoutImportController.java:220)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:219)
              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.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
              at com.sun.proxy.$Proxy134.importLayouts(Unknown Source)
              at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:112)
              at com.liferay.exportimport.internal.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:285)
              at com.liferay.exportimport.internal.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:258)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
              at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
              at com.liferay.exportimport.internal.background.task.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:145)
              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:132)
              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.friendly.url.exception.DuplicateFriendlyURLEntryException: {mvccVersion=0, friendlyURLEntryLocalizationId=1, companyId=20099, friendlyURLEntryId=37325, languageId=en_US, urlTitle=pepe, groupId=20126, classNameId=23801, classPK=37316}
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.validate(FriendlyURLEntryLocalServiceImpl.java:476)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.validate(FriendlyURLEntryLocalServiceImpl.java:444)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.addFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:84)
              at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.addFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:72)
              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.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:46)
              at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
              at com.sun.proxy.$Proxy481.addFriendlyURLEntry(Unknown Source)
              at com.liferay.friendly.url.internal.exportimport.staged.model.repository.FriendlyURLEntryStagedModelRepository.addStagedModel(FriendlyURLEntryStagedModelRepository.java:56)
              at com.liferay.friendly.url.internal.exportimport.staged.model.repository.FriendlyURLEntryStagedModelRepository.addStagedModel(FriendlyURLEntryStagedModelRepository.java:37)
              at com.liferay.friendly.url.internal.exportimport.data.handler.FriendlyURLEntryStagedModelDataHandler.doImportStagedModel(FriendlyURLEntryStagedModelDataHandler.java:131)
              at com.liferay.friendly.url.internal.exportimport.data.handler.FriendlyURLEntryStagedModelDataHandler.doImportStagedModel(FriendlyURLEntryStagedModelDataHandler.java:38)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
              ... 45 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                raven.song Raven Song
                Reporter:
                alberto.chaparro Alberto Chaparro
                Participants of an Issue:
                Recent user:
                Michael Prigge
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  27 weeks, 4 days ago

                  Packages

                  Version Package
                  7.1.X
                  Master