XWiki 12.4 - Blank attachment created by template extension - unable to delete the attachment from a document

Hi XWiki forums! I’ve found an issue on our installation of XWiki 12.4 and can’t seem to find anyone who has had a similar problem on the forum. We’ve installed the Templates Application Extension and allow users to use these templates to create documents.

The template extension adds image attachments to the wiki document, but these documents don’t actually exist on our file store (we are using the file store feature instead of the database for storing attachments). The attachment appears under the “Attachments” tab as follows:


When you try to delete the attachment, XWiki fails to delete it. The attachment is not found on the file store but the database contains the metadata for it.

My question is, is there any way to safely remove these attachments from XWiki?

Thank you in advance for your help!


same issue here with version 11.10.2. We can’t delete neither the attachment nor the whole page. Even renaming/moving is not possible.

Deletion works if i create a dummy file on the requested location using touch, but there are a lot of attachments we’d have to delete because of this issue (a lot of manual work).
It would be nice if we could have at least a “force”-parameter for deleting such attachments/pages to ignore the “file not found”-error.



We’re currently working on a feature to directly delete a page/attachment without putting it in recycle bin, you can follow this issue: https://jira.xwiki.org/browse/XWIKI-17401

It sounds like a bug of Templates Application Extension if you end up with unexisted attachment after installing it, you should report it on https://jira.xwiki.org/projects/TEMPLATES/


Are you running into issues with the same Encyclopedia and Article templates?


Thank you for the help, I’ve opened up an issue on Jira

we just use our own templates. I haven’t tested it using the default templates.
As a workaround, we removed the attachments/images from the templates to avoid this issue, but that’s not a solution.