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

Changing the default locale for a site (or portal) are causing several issues regarding localized web-contents and export/import

Details

    Description

      Changes in default language for a portal or site, are causing issues with already created web-content/structures/templates having a different default locale.

      Steps to reproduce

      1. Start a portal, default locale en_US
      2. Go to Control Panel > Sites > Global > Web Content
      3. Create an Structure with a text field: str1
      4. Create a Template for str1: tpl1
      5. Create a Web content with str1: wc1
      6. Export and download the lar file from Control Panel > Sites > Global > Web Content
      7. Go to Control Panel > Configuration > Display settings, and select Spanish as default language.
      8. Go to Control Panel > Sites > Global > Web Content - and import the lar file.

      Result error - view attached image

      Expected default translations in content (structures,templates, etc) should be used to populate a required language for the destination when the translation doesn't exist

      Logs

      15:29:24,317 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:137] Unable to execute background task
      com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portlet.dynamicdatamapping.TemplateNameException
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:236)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:299)
              at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:289)
              at com.liferay.portlet.journal.lar.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:245)
              at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:409)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:179)
              at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:618)
              at com.liferay.portal.lar.PortletImporter.doImportPortletInfo(PortletImporter.java:479)
              at com.liferay.portal.lar.PortletImporter.importPortletInfo(PortletImporter.java:198)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:1957)
              at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importPortletInfo(LayoutLocalServiceImpl.java:2025)
              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: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:140)
              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:55)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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 $Proxy63.importPortletInfo(Unknown Source)
              at com.liferay.portal.service.LayoutLocalServiceUtil.importPortletInfo(LayoutLocalServiceUtil.java:1403)
              at com.liferay.portal.lar.backgroundtask.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:61)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:56)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:111)
              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:71)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portlet.dynamicdatamapping.TemplateNameException
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl.validateName(DDMTemplateLocalServiceImpl.java:1548)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl.validate(DDMTemplateLocalServiceImpl.java:1487)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl.validate(DDMTemplateLocalServiceImpl.java:1499)
              at com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl.updateTemplate(DDMTemplateLocalServiceImpl.java:1307)
              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:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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 $Proxy133.updateTemplate(Unknown Source)
              at com.liferay.portlet.dynamicdatamapping.service.DDMTemplateLocalServiceUtil.updateTemplate(DDMTemplateLocalServiceUtil.java:1302)
              at com.liferay.portlet.dynamicdatamapping.lar.DDMTemplateStagedModelDataHandler.doImportStagedModel(DDMTemplateStagedModelDataHandler.java:396)
              at com.liferay.portlet.dynamicdatamapping.lar.DDMTemplateStagedModelDataHandler.doImportStagedModel(DDMTemplateStagedModelDataHandler.java:1)
              at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:224)
              ... 52 more
      
      

      Attachments

        Issue Links

          Activity

            People

              jose.jimenez Jose Jimenez
              jose.jimenez Jose Jimenez
              Liferay JIRA Bot Liferay JIRA Bot
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8 years, 29 weeks, 5 days ago

                Packages

                  Version Package
                  7.0.0 M3