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

TemplateNameException: Name is null is thrown when default locale is not en_US

    Details

    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1.) Please use a DXP bundle.

      2.) Start the bundle and navigate to Control Panel --> Configuration --> Instance Settings --> Miscellaneous --> Display Settings, here please set as the default language 'English (United Kingdom)' and save this configuration.

      3.) Please go back to Control Panel --> Configuration --> Virtual Instances, here add a new instance.

      Result: you get an exception displayed on the console similar to this:

      10:32:43,273 WARN  [http-nio-8080-exec-2][PortalInstanceLifecycleListenerManagerImpl:111] Unable to register portal instance {mvccVersion=1, companyId=32263, accountId=32265, webId=tz, key=dC0ygAN9tPBySLPGsmBflw==, mx=gmail.com, homeURL=, logoId=0, system=false, maxUsers=0, active=true}
      com.liferay.dynamic.data.mapping.exception.TemplateNameException: Name is null
              at com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl.validateName(DDMTemplateLocalServiceImpl.java:1679)
              at com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl.validate(DDMTemplateLocalServiceImpl.java:1666)
              at com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl.validate(DDMTemplateLocalServiceImpl.java:1618)
              at com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl.validate(DDMTemplateLocalServiceImpl.java:1607)
              at com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl.addTemplate(DDMTemplateLocalServiceImpl.java:206)
              at sun.reflect.GeneratedMethodAccessor677.invoke(Unknown Source)
              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:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.$Proxy447.addTemplate(Unknown Source)
      

      This is because the nameMap DDMTemplateLocalServiceImpl.validateName() reads from doesn't have an entry with the site default locale.

        Attachments

          Activity

            People

            Assignee:
            istvan.dezsi Istvan Dezsi
            Reporter:
            istvan.dezsi Istvan Dezsi
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 4 weeks, 1 day ago

                Packages

                Version Package