Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-17113

Share doc preview not updated after new versions (eg. using AOS or manual upload new version or inline text editor ...)

    Details

      Description

      When documents are edited using the AOS the updates doesn't get reflected in the preview.

      To reproduce
      1. Edit a word document using "Edit in Microsoft Office". Start in the document details page.
      2. Save you changes in Word.
      3. Go to document details page. Refresh. Document is "Locked by you". Edits are not shown (expected since you still have the document open).
      4. Go back to word. Close the document.
      5. Go back to document details page. Refresh. Lock is gone. The preview still shows the older version. Expected: The preview will show the new version
      6. Click the download button. You can see that you edits are in the document, but not shown in the preview.

      Note: It sometimes shows the correct preview, so you may have to try a copule of times.
      Tested with AOS 1.1.3 and 5.2 Nightly from 2016-09-27 (cirka)

        Attachments

          Issue Links

            Activity

            Hide
            loftux Peter Löfgren added a comment -

            Did one additional change since I didn't get the lock check correct. It also prevented the lock owner from updating.
            Wit this change the user holding the lock can update in the afterCommit (ie the user editing in office and saving)
            https://github.com/loftuxab/alfresco-community-loftux/commit/1a4cad86c682b5315c7cc86eb218b9e2c35aa672

            Show
            loftux Peter Löfgren added a comment - Did one additional change since I didn't get the lock check correct. It also prevented the lock owner from updating. Wit this change the user holding the lock can update in the afterCommit (ie the user editing in office and saving) https://github.com/loftuxab/alfresco-community-loftux/commit/1a4cad86c682b5315c7cc86eb218b9e2c35aa672
            Hide
            loftux Peter Löfgren added a comment -

            Hi,

            I had in my fix for this changes to check if a node exists, your fix based on what I did excluded that part.
            With 201702GA I just got

            2017-02-22 13:40:52,986  ERROR [util.transaction.TransactionSupportUtil] [defaultAsyncAction6] After completion (committed) TransactionalCache exception
             org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/9521ddcc-abd5-4fdc-86a3-2134a9ca3a8d (status:Status[id=825changeTxnId=f8119502-af7d-43c4-864e-9bd70db08737, dbTxnId=69, deleted=true])
            	at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:198)
            	at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect_aroundBody38(DbNodeServiceImpl.java:1043)
            	at org.alfresco.repo.node.db.DbNodeServiceImpl$AjcClosure39.run(DbNodeServiceImpl.java:1)
            	at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
            	at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100)
            	at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceImpl.java:1037)
            	at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            	at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:126)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            	at com.sun.proxy.$Proxy26.hasAspect(Unknown Source)
            	at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
            	at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:111)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            	at com.sun.proxy.$Proxy26.hasAspect(Unknown Source)
            	at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:231)
            	at com.sun.proxy.$Proxy48.hasAspect(Unknown Source)
            	at org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPropertyInterceptor.java:329)
            	at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:168)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:205)
            	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            	at com.sun.proxy.$Proxy26.getProperty(Unknown Source)
            	at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
            	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
            	at com.sun.proxy.$Proxy26.getProperty(Unknown Source)
            	at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1$1.execute(ThumbnailServiceImpl.java:913)
            	at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1$1.execute(ThumbnailServiceImpl.java:1)
            	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464)
            	at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1.doWork(ThumbnailServiceImpl.java:903)
            	at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1.doWork(ThumbnailServiceImpl.java:1)
            	at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
            	at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter.afterCommit(ThumbnailServiceImpl.java:894)
            	at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.afterCompletion(TransactionSupportUtil.java:597)
            	at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)
            	at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:994)
            	at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:969)
            	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:800)
            	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
            	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
            	at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482)
            	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:486)
            	at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:333)
            	at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:439)
            	at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:126)
            	at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:95)
            	at org.alfresco.repo.tenant.TenantUtil$1.doWork(TenantUtil.java:69)
            	at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555)
            	at org.alfresco.repo.tenant.TenantUtil.runAsUserTenant(TenantUtil.java:65)
            	at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:442)
            	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            	at java.lang.Thread.run(Thread.java:745)
            

            This may not propagate to cause ACE-5478 hibernate exceptions since it is now wrapped in a transaction, but can easily be handled with proper checks in the code if the node still exists.

            Show
            loftux Peter Löfgren added a comment - Hi, I had in my fix for this changes to check if a node exists, your fix based on what I did excluded that part. With 201702GA I just got 2017-02-22 13:40:52,986 ERROR [util.transaction.TransactionSupportUtil] [defaultAsyncAction6] After completion (committed) TransactionalCache exception org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace: //SpacesStore/9521ddcc-abd5-4fdc-86a3-2134a9ca3a8d (status:Status[id=825changeTxnId=f8119502-af7d-43c4-864e-9bd70db08737, dbTxnId=69, deleted= true ]) at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNodeServiceImpl.java:198) at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect_aroundBody38(DbNodeServiceImpl.java:1043) at org.alfresco.repo.node.db.DbNodeServiceImpl$AjcClosure39.run(DbNodeServiceImpl.java:1) at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) at org.alfresco.traitextender.RouteExtensions.intercept(RouteExtensions.java:100) at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceImpl.java:1037) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.alfresco.repo.lock.mem.LockableAspectInterceptor.invoke(LockableAspectInterceptor.java:126) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy26.hasAspect(Unknown Source) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:111) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy26.hasAspect(Unknown Source) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:231) at com.sun.proxy.$Proxy48.hasAspect(Unknown Source) at org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPropertyInterceptor.java:329) at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:168) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:205) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy26.getProperty(Unknown Source) at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy26.getProperty(Unknown Source) at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1$1.execute(ThumbnailServiceImpl.java:913) at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1$1.execute(ThumbnailServiceImpl.java:1) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464) at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1.doWork(ThumbnailServiceImpl.java:903) at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter$1.doWork(ThumbnailServiceImpl.java:1) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555) at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$ThumbnailTransactionListenerAdapter.afterCommit(ThumbnailServiceImpl.java:894) at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.afterCompletion(TransactionSupportUtil.java:597) at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168) at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:994) at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:969) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:800) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:486) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:333) at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:439) at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:126) at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:95) at org.alfresco.repo.tenant.TenantUtil$1.doWork(TenantUtil.java:69) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555) at org.alfresco.repo.tenant.TenantUtil.runAsUserTenant(TenantUtil.java:65) at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:442) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang. Thread .run( Thread .java:745) This may not propagate to cause ACE-5478 hibernate exceptions since it is now wrapped in a transaction, but can easily be handled with proper checks in the code if the node still exists.
            Hide
            resplin Richard Esplin added a comment -

            Thank you for pointing this out Peter. Can you please raise this as a separate issue in the ALF project and link it here?

            Show
            resplin Richard Esplin added a comment - Thank you for pointing this out Peter. Can you please raise this as a separate issue in the ALF project and link it here?
            Hide
            loftux Peter Löfgren added a comment -

            @resplin I have spent so much time on this issue already fixing this bug for you. And still took the time to point out that there still exist an issue. I've fixed this in the build I use with my customer, at this stage, I honestly don't care if you fix this in Alfresco or not. Open a new ticket if you want to, your choice, but I'm not doing it for you.

            Show
            loftux Peter Löfgren added a comment - @resplin I have spent so much time on this issue already fixing this bug for you. And still took the time to point out that there still exist an issue. I've fixed this in the build I use with my customer, at this stage, I honestly don't care if you fix this in Alfresco or not. Open a new ticket if you want to, your choice, but I'm not doing it for you.
            Hide
            resplin Richard Esplin added a comment - - edited

            Thanks for pointing out the remaining issue. I'll discuss it with engineering as REPO-2519.

            Show
            resplin Richard Esplin added a comment - - edited Thanks for pointing out the remaining issue. I'll discuss it with engineering as REPO-2519 .

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                loftux Peter Löfgren
              • Votes:
                4 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 weeks, 1 hour
                  2w 1h