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

Verify process cannot create missing Asset Entry because of a deleted User

    Details

      Description

      Steps to reproduce:

      1. Set the following portal property
        verify.frequency=-1
        
      2. Add a user which has Administrator role
      3. Login with the new user
      4. Go to the Documents and Media portlet and add a Folder
      5. Login with omni admin
      6. Go to Server Administration -> Scripts and run the following Groovy script
        import java.util.List;
        import com.liferay.portlet.documentlibrary.model.DLFolder;
        import com.liferay.portlet.asset.model.AssetEntry;
        import com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil;
        import com.liferay.portal.model.Group
        
        long companyId = com.liferay.portal.util.PortalUtil.getDefaultCompanyId();
        
        Group group = com.liferay.portal.service.GroupLocalServiceUtil.getGroup(companyId, "Guest");
        
        List<DLFolder> folders = com.liferay.portlet.documentlibrary.service.DLFolderLocalServiceUtil.getFolders(group.getGroupId(), 0)
        
        for (DLFolder folder : folders) {
            AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry("com.liferay.portlet.documentlibrary.model.DLFolder", folder.getFolderId());
            AssetEntryLocalServiceUtil.deleteAssetEntry(assetEntry);
        }
        
      7. Delete the user
      8. Restart server

      Result: "No User exists"

      10:55:35,045 INFO  [localhost-startStop-1][VerifyProcess:55] Verifying com.liferay.portal.verify.VerifyDocumentLibrary
      10:55:35,118 WARN  [localhost-startStop-1][VerifyDocumentLibrary:496] Unable to update asset for folder 10522: No User exists with the primary key 10490
      

      Expected: The Verify Process doesn't fail and the missing asset entries get created.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              akos.thurzo Akos Thurzo (Inactive)
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 7 weeks ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1