Unable to remove page - unable to find the document error

Hi there,

I think I did a mistake trying to create a page containing French accentuated chars. Now this page appears as User Unknown and when trying to remove it, I get a strange message saying that the document cannot be found.

I was figuring how to remove this link somewhere (in the database itself, but where ? on the system ?). Everything is working fine, except this link which cannot be deleted…

Any idea would be much appreciated.

Regards,
B.

XWiki should not barf on accented characters if configured property. The Admin-guide on xwiki.org has a page of its own about encoding at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Configuration/Encoding/

The page is a bit out of date (the first hint about the web.xml should no longer be necessary), but the rest is worth checking, After fixing up the config you should be able to access the page like all the others. There are quite a few places to check, but it is worth the effort.

If you want to remove the page programmatically, check this snippet:
https://snippets.xwiki.org/xwiki/bin/view/Extension/Forcefully%20delete%20a%20document%20with%20many%20attachments

It does not really what you want (you likely cannot type in the name/space explicitly) but if you take the second version you can change the query

"where doc.name='TargetDocument' and doc.space='TargetSpace' order by doc.name"

by something like:

"where doc.fullName like '%Pag%Name%'  order by doc.name"

where the middle % takes the place of your accented character. Update the query string until you get only the page you want to delete before confirming the deletion :wink: