Wiki attachments are missing and cannot be deleted (2025.02)

Today I had
1.I had use the " Check missing filesystem attachments" extensions and got 106 erros.
2.What error do you get when you try to delete them ?
Failed to delete attachment:
3.Also which version of XWiki is that ?
16.10.3
Ref:
wiki-attachments-are-missing-and-cannot-be-deleted/5684

:rocket: Solution: Fix XWiki Absolute URL for Attachments

:one: Enable Absolute URL in XWiki Configuration

Run:

sh

複製編輯

sudo nano /etc/xwiki/xwiki.cfg

:pushpin: Find this line (if it has #, remove the # to uncomment it):

ini

複製編輯

# xwiki.redirect.absoluteurl=0

Change it to:

ini

複製編輯

xwiki.redirect.absoluteurl=1

:pushpin: Then, ensure these settings exist. If they are missing, add them:

ini

複製編輯

xwiki.home=https://www.TEST.com/xwiki
xwiki.url.protocol=https
xwiki.forceAbsoluteURL=1

:rocket: Save the file (Ctrl + XYEnter) and restart XWiki:

sh

複製編輯

sudo systemctl restart tomcat10

:two: Clear XWiki Cache

Run:

sh

複製編輯

sudo rm -rf /var/lib/xwiki/data/cache/*
sudo systemctl restart tomcat10

:pushpin: This ensures the new xwiki.cfg settings take effect.

THANKS CHATGPT

1 Like