Hi,
Somehow I had a template with broken attachments, they are shown in the page but not present in the file system, and after using it to write all the documentation we have realized that this has spread all over the pages and we cannot delete the attachment because it throws:
com.xpn.xwiki.XWikiException: Error number 3002 in 3: The attachment [Attachment itwiki:ITS Ops.EMBL wide Services.Jitsi Meet.WebHome@image-20190401184105-1.png] (file /usr/local/xwiki/data/storage/itwiki/%49%54%53 %4Fps/%45%4D%42%4C wide %53ervices/%4Aitsi %4Deet/%57eb%48ome/~this/attachments/image-20190401184105-1.png/image-20190401184105-1.png) could not be found in the filesystem attachment store.
at org.xwiki.store.legacy.store.internal.FilesystemAttachmentStore.loadAttachmentContent(FilesystemAttachmentStore.java:214)
Is there a way to fix it? I have run this script and found 1000 entries:
https://snippets.xwiki.org/xwiki/bin/view/Extension/Attachments%20Checker/