Moving documents to Trashcan is broken

When things don't work as they should.
Post Reply
mayanvic
Posts: 28
Joined: Thu Aug 23, 2018 4:27 pm

Moving documents to Trashcan is broken

Post by mayanvic »

On 3.5.1+, I see a strange behavior when moving docs to the trash.

I select a document and move it to the trash and it still appears in the recently added items. I select it again to move to trash and it does disappear from the documents with the normal popup notification again, document moved to trash...

But then looking in the trashcan its empty? looks like the second move to trash may be emptying the trashcan?
this problem was seen in 3.5.1 so not new.

regards,
Victor
mayanvic
Posts: 28
Joined: Thu Aug 23, 2018 4:27 pm

Re: Moving documents to Trashcan is broken

Post by mayanvic »

In testing more on 3.5.x environments here is what I found to replicate this issue.

1) View recently added documents.
2) Check a document and select action, move to trash.
3) Refresh the recently added documents and the document is still listed.
4) Select Trash can and see that the same document is also appearing in the trash can.

Now either empty trash and the document will disappear from both trash and the recently added docs.
Or select the same document in recently added docs and select move to trash again. It will disappear from both locations as well.
User avatar
rosarior
Developer
Developer
Posts: 624
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Moving documents to Trashcan is broken

Post by rosarior »

Thanks to recent feedback we were able to replicate and understand the root of the cause. This is now being handled as tickets #910 and #920

The cause is not complicated but requires writing a new test for each of the up to 279 views that manipulate trashed documents. The first commit solving the issue for the documents app was committed and as your can see it is mostly tests and just one line change per view. https://gitlab.com/mayan-edms/mayan-edm ... 6a76524468

This is being worked on as part of up coming version 3.5.4.

https://gitlab.com/mayan-edms/mayan-edms/-/issues/910
https://gitlab.com/mayan-edms/mayan-edms/-/issues/920
mayanvic
Posts: 28
Joined: Thu Aug 23, 2018 4:27 pm

Re: Moving documents to Trashcan is broken

Post by mayanvic »

I can confirm documents are moved to the Trash bin correctly with 3.5.4.

There is still one issue with the documents in the Trash bin, the thumbnails are broken and page count shows them a zero pages.
A restore from trash does work correctly, but you have no way to previewing what documents are in the trash bin now and select one to restore.

thanks
User avatar
rosarior
Developer
Developer
Posts: 624
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Moving documents to Trashcan is broken

Post by rosarior »

Version 3.5.5 includes a fix for this, please give it a try.
Post Reply