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

Publications UI gives option to edit document conflict when document doesn't exist on production

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Publications
    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Add a Document
      2. Create a Publication
      3. Edit the Document
      4. Switch to Production
      5. Delete the Document
      6. Switch to Publication
      7. Attempt to Publish
      8. Assert that there needs to be a manual resolution
      9. Click edit button for document

      Expected Result: Perhaps we shouldn't show the edit button if it's not possible to edit the deleted document?

      Actual Result: Portlet is temporarily unavailable and the following error shows

      2021-09-02 19:11:59.727 ERROR [http-nio-8080-exec-6][render_portlet_jsp:131] null
      com.liferay.portal.kernel.exception.NoSuchResourcePermissionException: {companyId=20100, name=com.liferay.document.library.kernel.model.DLFileEntry, primKey=42283, scope=4}
      	at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:1062) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) ~[portal-kernel.jar:?]
      	at com.liferay.portal.kernel.service.ResourcePermissionLocalServiceWrapper.hasResourcePermission(ResourcePermissionLocalServiceWrapper.java:789) ~[portal-kernel.jar:?]
      	at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:66) ~[portal-kernel.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
      	at com.liferay.portal.service.impl.ResourceLocalServiceImpl.hasUserPermissions(ResourceLocalServiceImpl.java:406) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.service.ResourceLocalServiceUtil.hasUserPermissions(ResourceLocalServiceUtil.java:345) ~[portal-kernel.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker.doCheckPermission(AdvancedPermissionChecker.java:433) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasUserPermissionImpl(AdvancedPermissionChecker.java:1321) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker._hasPermissionImpl(AdvancedPermissionChecker.java:1290) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.AdvancedPermissionChecker.hasPermission(AdvancedPermissionChecker.java:240) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.BasePermissionChecker.hasPermission(BasePermissionChecker.java:89) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.StagingPermissionChecker.hasPermission(StagingPermissionChecker.java:117) ~[portal-impl.jar:?]
      	at com.liferay.portal.security.permission.StagingPermissionChecker.hasPermission(StagingPermissionChecker.java:145) ~[portal-impl.jar:?]
      	at com.liferay.portal.kernel.security.permission.wrapper.PermissionCheckerWrapper.hasPermission(PermissionCheckerWrapper.java:115) ~[portal-kernel.jar:?]

      Tested on:
      Tomcat 9.0.43 + MySQL 5.7
      Portal master SHA: e9b3841a4e2582018dd69db3157617dbca0274f9

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            brian.lee Brian Lee
            Participants of an Issue:
            Recent user:
            Brian Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              12 weeks, 5 days ago

                Packages

                Version Package