PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-37425

Resource importer fails if articles to import do not have translation to default locale

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      2
    • Similar Issues:
      Show 5 results 

      Description

      The bug can be reproduced using the following steps:

      1) Change default locale for portal (for example es_ES).
      2) Install zoe-theme form MP
      3) Exception is raised

      08:48:18,720 INFO [liferay/hot_deploy-1][HotDeployMessageListener:151] Importing resources from zoe-brochure-theme to group 11015
      08:48:20,032 ERROR [liferay/hot_deploy-1][SerialDestination:113] Unable to process message {destinationName=liferay/hot_deploy, response=null, responseDestinationName=null, responseId=null, payload=null, values={principalPassword=null, principalName=null, command=deploy, companyId=0, servletContextName=zoe-brochure-theme}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portlet.journal.ArticleTitleException
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:31)
      at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
      at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:110)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:671)
      at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:582)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portlet.journal.ArticleTitleException
      at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.validate(JournalArticleLocalServiceImpl.java:3459)
      at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.validate(JournalArticleLocalServiceImpl.java:3549)
      at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.addArticle(JournalArticleLocalServiceImpl.java:192)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.security.pacl.PACLAdvice.invoke(PACLAdvice.java:51)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at $Proxy205.addArticle(Unknown Source)
      at com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil.addArticle(JournalArticleLocalServiceUtil.java:306)
      at com.liferay.resourcesimporter.util.FileSystemImporter.doAddJournalArticles(FileSystemImporter.java:427)
      at com.liferay.resourcesimporter.util.ResourceImporter.addJournalArticles(ResourceImporter.java:119)
      at com.liferay.resourcesimporter.util.FileSystemImporter.doAddJournalTemplates(FileSystemImporter.java:476)
      at com.liferay.resourcesimporter.util.ResourceImporter.addJournalTemplates(ResourceImporter.java:192)
      at com.liferay.resourcesimporter.util.FileSystemImporter.doAddJournalStructures(FileSystemImporter.java:456)
      at com.liferay.resourcesimporter.util.ResourceImporter.addJournalStructures(ResourceImporter.java:156)
      at com.liferay.resourcesimporter.util.ResourceImporter.importResources(ResourceImporter.java:45)
      at com.liferay.resourcesimporter.messaging.HotDeployMessageListener.doReceive(HotDeployMessageListener.java:156)
      at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:25)
      ... 5 more

      Resources are not imported.

        Activity

        Hide
        Alberto Montero added a comment -

        There is an easy workaround, which consist in changing the default portal locale to one of the languages that all articles have translation to. After this change, import works correctly.

        Show
        Alberto Montero added a comment - There is an easy workaround, which consist in changing the default portal locale to one of the languages that all articles have translation to. After this change, import works correctly.
        Show
        Alberto Montero added a comment - https://github.com/natecavanaugh/liferay-plugins/pull/120
        Hide
        Lu Liu added a comment - - edited

        PASSED Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: cb3648612c16416348da810b4dd148e3201bc8e3.
        Plugins 6.2.x EE GIT ID: ee224d3a5472a9b94bf7ba855f925d3acc43ebaa.

        There is an exception if articles to import do not have translation to default locale.

        Fixed on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 2fc7a5f5b10e35d24a602bbacbce8f414503a52a.
        Plugins 6.1.x EE GIT ID: 6ee2f4dfef845a61bf9e0f3ef5ae1bb118d94fe4.
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: c686bf054d1ee89625f6ce03585604e565402e10.
        Plugins 6.2.x EE GIT ID: 02ac3d8315ab925050d2e3c4629a8ffe3613df94.

        There isn't an exception if articles to import do not have translation to default locale.

        Show
        Lu Liu added a comment - - edited PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: cb3648612c16416348da810b4dd148e3201bc8e3. Plugins 6.2.x EE GIT ID: ee224d3a5472a9b94bf7ba855f925d3acc43ebaa. There is an exception if articles to import do not have translation to default locale. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 2fc7a5f5b10e35d24a602bbacbce8f414503a52a. Plugins 6.1.x EE GIT ID: 6ee2f4dfef845a61bf9e0f3ef5ae1bb118d94fe4. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: c686bf054d1ee89625f6ce03585604e565402e10. Plugins 6.2.x EE GIT ID: 02ac3d8315ab925050d2e3c4629a8ffe3613df94. There isn't an exception if articles to import do not have translation to default locale.

          People

          • Assignee:
            Lu Liu
            Reporter:
            Alberto Montero
            Recent user:
            Esther Sanz
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 47 weeks, 6 days ago

              Development

                Structure Helper Panel