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

Error activating Staging: The available languages in the LAR file (<em>es_ES</em>) do not match the site's available languages (<em>en_US</em>).

    Details

      Description

      The following error is shown during staging activation:

      • An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
      • The available languages in the LAR file (<em>es_ES</em>) do not match the site's available languages (<em>en_US</em>).

      Steps to reproduce

      1. Create a clean site
      2. Open "Site Settings" => "Display Settings"
      3. Manually configure at site only two languages: Spanish "es_ES" (as default) and English "en_US" as second language
      4. Create a web content, add both es_ES and en_US translations. Leave the "es_ES" translation as default
      5. Change content status to "Publish"
      6. Open again "Site Settings" => "Display Settings"
      7. Manually configure at site only only one language: English "en_US" as default
      8. Activate Local Staging
      9. As first step, the process will export all contents to temporary LAR at disk (it can be verified activating log traces)
      10. As second step, the process will import the LAR but it will fail with described error:
      • The available languages in the LAR file (<em>es_ES</em>) do not match the site's available languages (<em>en_US</em>).

      The following exception is thrown at log:

      com.liferay.portal.LocaleException: The locale es_ES is not available in site with groupId3225864
              at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.validate(JournalArticleLocalServiceImpl.java:6626)
              at com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl.updateArticle(JournalArticleLocalServiceImpl.java:4777)
              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:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy219.updateArticle(Unknown Source)
              at com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil.updateArticle(JournalArticleLocalServiceUtil.java:3139)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:647)
              at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:165)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:340)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:330)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:277)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:330)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:192)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:975)
              at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:793)
              at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:254)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1763)
              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:115)
              at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:183)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:141)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy33.importLayouts(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1282)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingCallable.call(LayoutStagingBackgroundTaskExecutor.java:202)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor$LayoutStagingCallable.call(LayoutStagingBackgroundTaskExecutor.java:1)
              at com.liferay.portal.spring.transaction.TransactionalCallableUtil$CallableMethodInvocation.proceed(TransactionalCallableUtil.java:84)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionalCallableUtil.call(TransactionalCallableUtil.java:36)
              at com.liferay.portal.lar.backgroundtask.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:83)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:56)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:108)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
      

      We must avoid this error, because it is thrown after a lot of hours of processing time. I think we have two options:

      1. Throw the error at export time, executing the validation that fails at import time. This will save a lot of time for big sites
      2. Filter webcontent and ignore invalid languages when webcontent contains also any other correct language.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jorge.diaz Jorge Diaz
                Reporter:
                jorge.diaz Jorge Diaz
                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:
                  3 years, 18 weeks, 2 days ago