Details

      Description

      Steps to reproduce:

      1. Add a new site named: "Site Name".
      2. Add a public page: "Test Page Name".
      3. Enable Local Staging (make sure Audience targeting is staged.)
      4. Go to Configuration -> Audience Targeting
      5. Add Use Segment with gender rule: Male, and then save.
      6. Go to WebContent > web content with Category: User Segment.
      7. Navigate to the page named 'Test Page Name'.
      8. Add a 'User Segment Content List' portlet
      9. Publish to live.
      10. Navigate to Product Menu > Sites > Configuration > Audience Targeting,
      11. Edit the user segment
      12. Change the gender rule: Female, then save.
      13. Publish to live again

      Expected Result:
      Publish successfully.

      Actual Result:
      User segment fails to publish, the console throws the following error:
      See screenshot below.

      17:03:40,690 WARN  [liferay/background_task-3][LayoutStagingBackgroundTaskExecutor:171] Unable to publish layout: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
      17:03:40,698 ERROR [liferay/background_task-3][BackgroundTaskMessageListener:165] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:156)
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:48)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:369)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:355)
      	at com.liferay.content.targeting.internal.lar.ContentTargetingPortletDataHandler.doImportData(ContentTargetingPortletDataHandler.java:154)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:382)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:296)
      	at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:834)
      	at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:827)
      	at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:225)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
      	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:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy105.importLayouts(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:100)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:273)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:246)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:101)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:47)
      	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
      	at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:139)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
      	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
      	at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
      	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:124)
      	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:756)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.asset.kernel.exception.DuplicateVocabularyException: A category vocabulary with the name User Segment already exists
      	at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.validate(AssetVocabularyLocalServiceImpl.java:497)
      	at com.liferay.portlet.asset.service.impl.AssetVocabularyLocalServiceImpl.addVocabulary(AssetVocabularyLocalServiceImpl.java:104)
      	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:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy174.addVocabulary(Unknown Source)
      	at com.liferay.content.targeting.util.UserSegmentUtil.addAssetVocabulary(UserSegmentUtil.java:64)
      	at com.liferay.content.targeting.util.UserSegmentUtil.getAssetVocabularyId(UserSegmentUtil.java:111)
      	at com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl.updateUserSegmentCategory(UserSegmentLocalServiceImpl.java:586)
      	at com.liferay.content.targeting.service.impl.UserSegmentLocalServiceImpl.updateUserSegment(UserSegmentLocalServiceImpl.java:426)
      	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:163)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy494.updateUserSegment(Unknown Source)
      	at com.liferay.content.targeting.internal.lar.UserSegmentStagedModelDataHandler.importStagedModel(UserSegmentStagedModelDataHandler.java:137)
      	... 40 more
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: