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

Import-Export of calendar is not working in multi-language environment

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.2.1 CE GA2
    • Fix Version/s: 6.2.3 CE GA4, 6.2.X EE
    • Component/s: Calendar
    • Labels:
      None

      Description

      We are using multi-language portal with default language different from English.
      But - system locale (and default Java language) is English.

      As result, we have problems then trying to create site from site-template in case, site used calendar (for example - then we assigning users to Social Office and Liferay trying to create Social Office User Home site).

      Exception is like:

      Caused by: com.liferay.calendar.CalendarResourceNameException
      at com.liferay.calendar.service.impl.CalendarResourceLocalServiceImpl.validate(CalendarResourceLocalServiceImpl.java:354)
      at com.liferay.calendar.service.impl.CalendarResourceLocalServiceImpl.updateCalendarResource(CalendarResourceLocalServiceImpl.java:303)
      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.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      at com.sun.proxy.$Proxy664.updateCalendarResource(Unknown Source)
      at com.liferay.calendar.service.CalendarResourceLocalServiceUtil.updateCalendarResource(CalendarResourceLocalServiceUtil.java:431)
      at com.liferay.calendar.lar.CalendarResourceStagedModelDataHandler.doImportStagedModel(CalendarResourceStagedModelDataHandler.java:172)
      at com.liferay.calendar.lar.CalendarResourceStagedModelDataHandler.doImportStagedModel(CalendarResourceStagedModelDataHandler.java:1)
      at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:159)
      ... 128 more

      Actually - problem is in line: https://github.com/liferay/liferay-plugins/blob/master/portlets/calendar-portlet/docroot/WEB-INF/src/com/liferay/calendar/service/impl/CalendarResourceLocalServiceImpl.java#L340
      We getting system default locale - and since it is different from portal default locale (for example system locale is English, but portal used only Russian language) it is failed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 16 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.3 CE GA4
                  6.2.X EE