Attachments v1.1 are lost when being updated

Hello all,

may you could help me with following:

Apparently, there seems to be a “bug” where attachments added to pages in the wiki get deleted instead of archived when you upload them with the same name as a new version — BUT only when updating from V1.1 to V1.2.

V1.2, V1.3—and everything after that—is versioned. So I decided to test it out today.

I was able to reproduce this on my Linux and my Windows webservers with XWiki versions 15.10.13, 15.10.16, 16.10.5, and the current stable version, 17.10.7. For database I used Oracle 11g and Oracle 23ai with ojdbc17.jar

My settings in the xwiki.cfg file:

xwiki.store.recyclebin.content.hint=hibernate
xwiki.store.attachment.hint=hibernate
xwiki.store.attachment.versioning.hint=hibernate
xwiki.store.attachment.recyclebin.content.hint=hibernate

xwiki.store.main.hint=hibernate
xwiki.store.versioning.hint=hibernate
xwiki.store.recyclebin.hint=hibernate
xwiki.store.attachment.recyclebin.hint=hibernate
xwiki.store.migration.manager.hint=hibernate

xwiki.recyclebin=1
storage.attachment.recyclebin=1
xwiki.store.versioning=1
xwiki.store.attachment.versioning=1
xwiki.store.rollbackattachmentwithdocuments=1

It’s due to the storage method. If you store the attachments in the database, the “bug” occurs. However, if you store them on disk (the first setting set with “=file”), everything works as it should - v1.1 will not be erased.

For now, the safest and fastest solution for now would be to re-upload every v1.1 attachment to update it to v1.2.

Are there any other options for saving attachments in the database (rather than the filesystem) without upload it manually two times - like change the upload process, to upload the attachment a second time automatically?

Thanks in advance!

Thx, I could reproduce and I’ve created Loading...

1 Like