On 01/19/2011 09:42 PM, Paul Libbrecht wrote:
Hello XWikiers,
I am a bit stuck with a page whose URL ends with %20 because of some earlier automated
population process.
Works for me on the 3.0 trunk. What version of the core are you using?
The problem is that using Document.rename doesn't
work, that using the GUi also doesn't.
Deleting also fails.
My best bet is to go into the SQL and I did this but that was not sufficient: I changed
xwd_fullname and xwd_name and now the document is said to exist with xwiki.exists() but
the page with spaces seems still to exist and the page without space seems to be not
web-callable.
You can't do that. The critical field is the xwd_id, which is the
hashcode of the document name (look in XWikiDocument.getId() to see how
it's implemented). You should at least update the ID as well (compute
the new hashcode in a simple java program, or call
$xwiki.getDocument('new name without space').getId() to see it).
Then you'll still have broken data if the document had object, and the
revision history is broken (orphaned) as well.
I would love hints.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/