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

Deleting attached file in DDL results in NoSuchRecordException

    Details

      Description

      Files uploaded to DDL records cannot be deleted; when you click on the "Delete" button, the following exception occurs in the log.

      16:35:57,113 ERROR [http-bio-8080-exec-14][render_portlet_jsp:154] com.liferay.portlet.dynamicdatalists.NoSuchRecordException: No DDLRecord exists with the primary key 0
       3    at com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistenceImpl.findByPrimaryKey(DDLRecordPersistenceImpl.java:3321)
       4    at com.liferay.portlet.dynamicdatalists.service.persistence.DDLRecordPersistenceImpl.findByPrimaryKey(DDLRecordPersistenceImpl.java:3338)
       5    at com.liferay.portlet.dynamicdatalists.service.impl.DDLRecordLocalServiceImpl.getRecord(DDLRecordLocalServiceImpl.java:319)
       6    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
       7    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:80)
       8    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
       9    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:162)
      10    at com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalServiceUtil.getRecord(DDLRecordLocalServiceUtil.java:388)
      11    at com.liferay.portlet.dynamicdatalists.action.EditRecordFileAction.deleteRecordFieldFile(EditRecordFileAction.java:103)
      12    at com.liferay.portlet.dynamicdatalists.action.EditRecordFileAction.processAction(EditRecordFileAction.java:66)
      13    at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:171)
      14    at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:214)
      15    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
      16    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
      17    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:554)
      18    at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:585)
      19    at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:295)
      20    at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:510)
      21    at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:115)
      22    at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:73)
      

      Steps to reproduce:

      1. Create a DDL with a upload and text.
      2. Add a record with some image as upload.
      3. Go to Control Panel and Action > Edit
      4. Try to delete the attached image.

      Result: Got an error above.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pani.gui Pani Gui (Inactive)
              Reporter:
              laszlo.csontos Laszlo Csontos (Inactive)
              Participants of an Issue:
              Recent user:
              Joyce Wang
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 32 weeks, 3 days ago

                  Packages

                  Version Package
                  6.1.2 CE GA3
                  6.1.30 EE GA3
                  6.2.0 CE M5