[xwiki-users] Empty Trash Can extension doesn't work
Hi, I couldn't even backup my sql database anymore because there are large pages (with attachments) in the recycle bin -- at least thats what I gathered from the mysqldump error message: mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table `xwikirecyclebin` at row: 45 I will have to adjust the max package size (again), but I want to move to file-system attachments. So, I thought I'd try and empty the recycle bin... I found the "Deleted Documents" list in the Document Index, but I have over 5 pages of them. Do I seriously have to click delete and Yes on every single one of these individually? I found this extension: http://extensions.xwiki.org/xwiki/bin/view/Extension/Empty+Trash+Bin I installed the Groovy Console and copy-pasted the code into the box, and clicked Execute... and nothing happened. I looked at the code, and executed the sql command directly in mysql: select distinct ddoc.fullName from XWikiDeletedDocument as ddoc where not exists (from XWikiDocument as doc where doc.fullName=ddoc.fullName); But it doesn't work - invalid SQL. I adjusted it to: select distinct ddoc.fullName from XWikiDeletedDocument as ddoc where not exists (select doc.fullName from XWikiDocument as doc where doc.fullName=ddoc.fullName); but it says XWikiDeletedDocument doesn't exist anymore. So, how am I supposed to delete things from the recycle bin? The only thing useful I can find is this: http://markmail.org/message/6yxwwczjk7pwowbd Which seems to suggest I do: delete from xwikirecyclebin; But, will that stuff something up? The extension is out of date, so I can only assume that this advice might be too. cheers Paul
So, how am I supposed to delete things from the recycle bin?
The only thing useful I can find is this: http://markmail.org/message/6yxwwczjk7pwowbd
Which seems to suggest I do: delete from xwikirecyclebin;
But, will that stuff something up? The extension is out of date, so I can only assume that this advice might be too.
cheers Paul
The above advice does seem incomplete... to delete attachments, you would have to clear the xwikiattrecyclebin table, and perhaps more!
A comment on usability... the deleted documents list has a restore and purge button right next to each other -- very easy to mis-click Delete does the right thing and asks "are you sure" Restore just restores the blasted document... so now the user must go into the Document Index in order to delete the document again!
participants (1)
-
Paul Harris