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

Inconsistent teams after export/import roles with "Delete data before importing" selected

    Details

      Description

      If a site contains teams, they become inconsistent after export/import roles with "Delete data before importing" selected.

      Steps to reproduce the issue:

      1. Create a site
      2. Create a team in this site
      3. Export roles to a lar
      4. Import roles from the lar previously created selecting "Delete data before importing".

      Current behaviour:

      Teams become corrupted (admins cannot execute any actions on them any more, see attached image teams-error.png).

      Stacktrace in logs:

      08:14:35,375 ERROR [http-bio-8080-exec-4][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=petvHUf7&p_p_id=191&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10917&refererPlid=10185&controlPanelCategory=sites generates exception: javax.servlet.ServletException: com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=10155, classNameId=10064, classPK=11074}
      com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=10155, classNameId=10064, classPK=11074}
              at com.liferay.portal.service.persistence.RolePersistenceImpl.findByC_C_C(RolePersistenceImpl.java:8275)
              at com.liferay.portal.service.impl.RoleLocalServiceImpl.getTeamRole(RoleLocalServiceImpl.java:838)
              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.liferay.portal.service.RoleLocalServiceUtil.getTeamRole(RoleLocalServiceUtil.java:935)
              at com.liferay.portal.model.impl.TeamImpl.getRole(TeamImpl.java:32)
              at com.liferay.portal.kernel.bean.AutoEscapeBeanHandler.invoke(AutoEscapeBeanHandler.java:71)
              at org.apache.jsp.html.portlet.sites_005fadmin.team_005faction_jsp._jspService(team_005faction_jsp.java:761)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      
      

      Expected behaviour:
      Teams working properly and no error in logs.

      NOTE: This causes other related issues like admin users are not allow to delete a site containing teams.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              felix.zhang Felix Zhang
              Reporter:
              daniel.couso Daniel Couso
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M4