Hi devs,

Because of tomcat and because tomcat is by far the most used container for 
xwiki and because we also bundle tomcat in the debian and docker dsitributions, 
I think we should disallow / and \ in page names by default. It's causing too 
much trouble for users. We keep having users posting problems and for one user 
who post a problem there are 100 who don't.

The latest one: 
https://forum.xwiki.org/t/please-help-broken-link-routing-cannot-open-page-from-navigation-any-help-appreciated/4448

+1 for me for the stripping of slashes. Even if configured properly there is a problem with tomcat: if you create a page e.g. in the Sandbox with a title of "Page A / B", this creates a page with the reference "Sandbox.Page A . B.WebHome", and you get an "empty" intermediate space.

 As users mostly see titles in the current XWiki version, it should not matter to them what happens to the page name.

Implementation idea:
* Offer an extension point in the create page UI to allow plugging some 
cleaning algorithm
* Provide the \ and / cleaning algorithm by default
* Handle backward compat. Find ways to not break existing users who are having 
/ and \ in page names. For example we could imagine a property in 
xwiki.properties that we would set to point to the hint of the / and \ cleaner 
component. Thus existing users would need to voluntarily upgrade their 
xwiki.properties to have it if they want it. We would need to provide some 
script to convert existing pages with / and \ too probably.

WDYT?

About backwards compatibility, I do not get the point. What will break for users who have already existing pages? As long as the cleaning algorithm only runs on newly created pages there should not be any bw/compat problem.

If they really want no cleaning, we can provide them with a property which contains the characters to be scrapped from the name with a default value of '/\', and if they do not want this, they can set this property to an empty value.
Or what am I missing here?

Best,
Clemens

Thanks
-Vincent

P.S. As a side note, when using MySQL creating spaces with a trailing whitespace seem to cause some odd problems, too. I have seen at least one occurrence of an entry in the xwikispaces with no corresponding entries in xwikidoc. This causes an entry in the navigation tree which leads to a non-existing page and no good way to get rid of it from a users point of view. I have not figured out how to reproduce the problem, unfortunately.

(For the issue with trailing spaces try "select 'x' = 'x ', 'x' like 'x '; "  and read https://dev.mysql.com/doc/refman/5.7/en/char.html )



Reply via email to