Quantcast

Attachments get deleted permanently

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Attachments get deleted permanently

Gaurav
This post has NOT been accepted by the mailing list yet.
Hello Guys,

I am facing an issue with my xwiki instance 6.4.7.Any help is highly appreciated
When we try to delete an attachment the attachment is not getting recovered.
ie the Document index doesnot show up the deleted attachments.
When I see the attachment directory the file is deleted from the location and another entry is created in the deleted-attachements directory.The same thing is happening if I try to rollback to another version which we had prior to attaching a document and then come back to the same version.Once we rollback get this error:

Steps to reproduce this error:
1) Write comments - version1
2) Attach any document in a page. - version2
3) Write some comments to a page -version 3
4) Go to history/minor edits and rollback to the first version version1.
5) rollback is successful
6) Now rollback to the 2nd version I get this error below as the attachment is deleted from location


Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -31
                at java.lang.String.substring(String.java:1967)
                at org.xwiki.store.legacy.store.internal.FilesystemAttachmentRecycleBinStore.getDocumentReference(FilesystemAttachmentRecycleBinStore.java:499)
                at org.xwiki.store.legacy.store.internal.FilesystemAttachmentRecycleBinStore.deletedAttachmentFromProvider(FilesystemAttachmentRecycleBinStore.java:471)
                at org.xwiki.store.legacy.store.internal.FilesystemAttachmentRecycleBinStore.getAllDeletedAttachments(FilesystemAttachmentRecycleBinStore.java:315)
                at com.xpn.xwiki.XWiki.rollback(XWiki.java:6005)
                at com.xpn.xwiki.web.RollbackAction.action(RollbackAction.java:51)
                at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:344)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Attachments get deleted permanently

Hamster
That looks a lot like the bug i reported ages ago...

https://jira.xwiki.org/browse/XWIKI-10234?filter=-2
Loading...