Handle cases where move/rename does not really need a move

I often see that users choose the “rename/move” when they just want to change the title of a page; maybe because they want to keep the page name in sync or they are not aware that they can change the title via editing the page.

There are some cases where this can lead to problems; e.g. with the default page naming strategy a “rename” of a Page from “A\B Testing” to “A/B Testing” will cause an error that there is already a page with the given name. Well, there is, but that is the current page, which simply kept its page name as “AB Testing”. With the “Preformatted names” I guess this case can happen at least as often.

My proposal to avoid this problem is to check if the current page is the same as the target page, and in that case just change the title of the page. That avoids some unexpected errors and is simpler that trying to educate users that the title can be changed via “edit” instead of “rename”.

Any opinions on this?


I’m not a big fan of this, as it really feels like a hack and I’m afraid it causes more problem than it solved. On the other hand I agree with you there’s an UX problem about renaming the page. IMO we should entirely drop using “Rename” vocabulary for that UI and only talk about “Moving” the page, because it’s always a move as the reference is changed.
Then we could have a shortcut in the more action menu to “Rename a page” that would redirect to editing the page and focus on the page title edition.
We actually had the vocabulary issue with @mflorea when performing a hackathon to introduce some actions on page directly from the navigation tree, and the idea we had was similar to what I just proposed AFAIR.

I guess I am missing something; I see an extra check plus two different code paths to be executed in the rename xpage, but that seems not too much of a hack. What other problems might it cause?

On the other hand the shortcut “Rename a page” to focus in the title field might be a bit tricky for pages which have a special edit sheet, especially if the sheet does not contain the page title (Blog.BlogPostSheet, I am looking at you).

Then +1 for me for dropping the “Rename” and only use “Move”.

Well I think the new behaviour won’t be expected for old users of XWiki who knows that the rename UI is for renaming the reference, and not for renaming the page. So it’s almost breaking an existing behaviour to have this 2 paths, especially if it’s done silently without asking a confirmation. That’s why I’m calling it a “hack”.

Good point. Now tbh I’m not sure it will be that much inconsistent, I mean right now if you’re an advanced user and chose “Edit with wiki editor” on a page which has a special edit sheet you get same problem.
But yes, ideally we should take that into consideration, and maybe provide a flag to allow extension with a special edit sheet to remove the action.