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

DuplicateKBArticleUrlTitleException occurs when import KBArtcile

    Details

      Description

      1. Deploy Knowledage-base portlet.
      2. Go to Content->Knowledage Base
      3. Add one kbArticle, title:a, version: 1
      4. Edit the article "a" so that generate new version(2)
      5. Export the KB as kb.lar
      6. Delete the kbArticle "a", and then import kb.lar (choose "Copy as New" as import Strategy).

      Expected Behavior: Import successful.
      Actual Behavior: Can't import KB successful. the below error will occur:

      Caused by: com.liferay.knowledgebase.DuplicateKBArticleUrlTitleException: Duplicate URL title /a
              at com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl.validateUrlTitle(KBArticleLocalServiceImpl.java:1980)
              at com.liferay.knowledgebase.service.impl.KBArticleLocalServiceImpl.addKBArticle(KBArticleLocalServiceImpl.java:130)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:38)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy718.addKBArticle(Unknown Source)
              at com.liferay.knowledgebase.service.KBArticleLocalServiceUtil.addKBArticle(KBArticleLocalServiceUtil.java:64)
              at com.liferay.knowledgebase.admin.lar.KBArticleStagedModelDataHandler.doImportStagedModel(KBArticleStagedModelDataHandler.java:296)
              at com.liferay.knowledgebase.admin.lar.KBArticleStagedModelDataHandler.doImportStagedModel(KBArticleStagedModelDataHandler.java:56)
              at com.liferay.portlet.exportimport.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:369)
              ... 49 more
      

        Attachments

          Activity

            People

            Assignee:
            melody.wu Melody Wu
            Reporter:
            hai.yu Hai Yu
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              6 years, 29 weeks, 2 days ago

                Packages

                Version Package
                6.2.X EE
                7.0.0 Alpha 3