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

User is able to delete a Data Definition that is being used in a DDL list

    Details

      Description

      Steps to Reproduce:

      1. Go to Liferay > Content > Dynamic Data Lists
      2. Add new list
      3. Select "To Do" data definition during list creation
      4. Save list
      5. Add list record
      6. Go to DDL portlet options > Manage Data Definitions
      7. Delete "To Do" definition
      8. Click "Ok" on confirmation message
      9. Go to created DDL list
      10. View records

      Expected Result:
      Portal prevents users from deleting data definition that is in use.

      Actual Result:
      Data Definition can be deleted by the user. The user then can no longer access DDL list records.

      On attempting to view the records, console throws:

      20:35:17,629 ERROR [http-bio-9080-exec-17][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_auth=U9rwKar0&p_p_id=com_liferay_dynamic_data_lists_web_portlet_DDLPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_displayStyle=list&_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_recordSetId=20941&_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_redirect=http%3A%2F%2Flocalhost%3A9080%2Fgroup%2Fguest%2F~%2Fcontrol_panel%2Fmanage%3Fp_p_auth%3DU9rwKar0%26p_p_id%3Dcom_liferay_dynamic_data_lists_web_portlet_DDLPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_mvcPath%3D%252Fview.jsp%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_cur%3D1%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_delta%3D20%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_description%3D%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_name%3D%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_orderByCol%3Dmodified-date%26_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_orderByType%3Dasc&_com_liferay_dynamic_data_lists_web_portlet_DDLPortlet_mvcPath=%2Fview_record_set.jsp&p_p_ajax=0&p_p_isolated=1 generates exception: com.liferay.dynamic.data.mapping.exception.NoSuchStructureException: No DDMStructure exists with the primary key 20700
      com.liferay.dynamic.data.mapping.exception.NoSuchStructureException: No DDMStructure exists with the primary key 20700
      	at com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructurePersistenceImpl.findByPrimaryKey(DDMStructurePersistenceImpl.java:9315)
      	at com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructurePersistenceImpl.findByPrimaryKey(DDMStructurePersistenceImpl.java:9332)
      	at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl.getStructure(DDMStructureLocalServiceImpl.java:742)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.liferay.dynamic.data.mapping.service.DDMStructureLocalServiceUtil.getStructure(DDMStructureLocalServiceUtil.java:784)
      	at com.liferay.dynamic.data.lists.model.impl.DDLRecordSetImpl.getDDMStructure(DDLRecordSetImpl.java:35)
      	at com.liferay.dynamic.data.lists.model.impl.DDLRecordSetImpl.getDDMStructure(DDLRecordSetImpl.java:42)
      	at com.liferay.dynamic.data.lists.web.display.context.DDLViewRecordsDisplayContext.<init>(DDLViewRecordsDisplayContext.java:44)
      	at org.apache.jsp.view_005frecords_jsp._jspService(view_005frecords_jsp.java:362)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      	at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:274)
      

      Reproduced on:
      Tomcat 7.0.62 + MySQL 5.6.25. Portal master GIT ID: d30b7827cb7b4abc7239aaf790ae6e83831753cf.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                victor.ware Victor Ware
                Reporter:
                victor.ware Victor Ware
                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, 42 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.0 Alpha 3