Le 20 janv. 2011 à 19:01, Sergiu Dumitriu a écrit :
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?
Still 1.5 (curriki-4).
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).
That tastes like a very good idea.
Then you'll still have broken data if the document
had object, and the
revision history is broken (orphaned) as well.
No issue at all here.
thanks, I'll give it a try.
paul