• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7700 for generic doc work for TWiki-6.0.2. Use View topic Item7703 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

A topic called 'test' will not be linked when written as [[test]], whereas [[Test]] is linked ok. This is a problem when users are allowed to choose free topic names, and all topics are linked with bracket notation.

Test cases:

Hmm, seems to work fine. Perhaps something with formatted search?

No, it works because LitterTray is a WikiWord. And so is TestCases web, so this bug will never be found...

Try Sandbox.test as long as it exists.

AC

I am not sure I understand the issue. The first character of a lowercase link should be capitalized, e.g. it should not be possible to create topics that start with a lower case name.

That is,

  • [[Test]] and [[test]] link both to a topic called Test in the current web.
  • [[Foo.Test]] and [[Foo.test]] link both to a topic called Test in the Foo web.
  • [[FooBar.Test]] and [[FooBar.test]] link both to a topic called Test in the FooBar web.

This is part of the [[link with spaces]] rule that links to the LinkWithSpaces topic. The start of a link can be treated as whitespace.

-- PTh


At first I have been afraid that this has been introduced by one of my recent patches, but obviously TWiki behaves like that for quite some time. The annoyance is that it is apparently possible to edit or save topics with an all-lowercase name. I managed to fall into that trap yesterday, in a 4.0.1ish TWiki.

-- HJ

It was actually possible even with Sep 2004 versions (I saw topics beginning with a lower case letter in the Sandbox web on twiki.org once in a while.)

-- PTh

I don't think we have a clear rule about naming of topics. WebTopicCreator will currently allow you to create all-lowercase topic names.

-- AC

I do not see any reason why we should not support an all lowercase topic name.

If a recent change broke this it should be fixed.

KJL

Here is the reason why we should not support initial lower case letters: It is not possible to link to them with the square bracket rule. It is not good to introduce an inconsistency with older TWiki versions by allowing initial lower case letters. FWIW, MediaWiki also converts initial lower case letters to upper case.

WebTopicCreator and other places should be fixed to work with the previous behaviour. Documentation should be updated to document the spec.

-- PTh

Why is it important to be compatible with old versions of TWiki?

Fixes should be done in rename and move templates as well.

-- AC

I wrote some nonsense which I deleted again.

KJL


Certainly not a requirement. Maybe not even a desirable enhancement.

-- TW

This was also discussed at the TWiki:Codev.EdinburghReleaseMeeting2006x12x11

it was decided that

  • Perl code gets altered so any creation or renaming of topics will have initial letter capital
  • Javascript should show the user that the resulting name will be with initial capital letter.
  • TextFormattingRules already describes current behavior which goes back to Cairo and maybe before. Peter may make doc clearer but it is documented to work the way it works today.

The reason is that we do not want to loose the ability to write something like

The description can be found in the [[test system description]]

which will be linked to TestSystemDescription

Ie. All spaces removed and all words capitalized. And this spec should not be different when we have a single word.

What we need is to make sure noone accidently creates topic names that you cannot link to.

I have renamed this bug report so it reflects the decision that the current behavour remains and that the code is made more robust so you do not accidently name topics all lowercase.

KJL


I guess TW dropped the priority to "Enhancement" and it hasn't been pushed up again - so I'll commit a fix, following TWiki:Codev.EdinburghReleaseMeeting2006x12x11.

A small doubt came about me when I read PTh's statement (I saw topics beginning with a lower case letter in the Sandbox web on twiki.org once in a while.) Would we need to take care for existing topics which start with a lower case letter?

On the other hand, I don't want to clutter the code in too many places to do checks for lower case - so here's the proposed spec:

  1. The rule to start a topic name with an uppercase letter is enforced in a central place (in TWiki.pm). This affects all operations. It will now be impossible to create a topic starting with a lowercase letter, and it will be also impossible to view a topic starting with a lowercase letter. Even if one could never link to such a topic with square brackets, one can construct URLs to these topics using %SCRIPTURL{view}%/Web/lowercase or %SCRIPTURL{view}%/?topic=Web.lowercase notation. These constructs will now point to %SCRIPTURL{view}%/Web/Lowercase.
  2. As a first exception, %INCLUDE{lowercase}% will continue to work if the topic exists.
  3. As a second exception, it is possible to rename topics from an old name which start with a lowercase letter. This is thought as an aid for people who inadvertedly have created such topics, and maybe linked to them, and do not have access to the command line.


Sorry, the first attempt to fix breaks develop. Reverting for further analysis. ..... Gotcha. If $TWiki::cfg{UseLocale} is true (I hadn't, so couldn't reproduce it), then ucfirst breaks Taint mode. I think we can rely on locales being installed trustworthy in TWiki, so I simply untaint unchecked.

HJ

...phew - seems to work now. Still ugly, improvements are welcome. Nonetheless the current state is Waiting for Release...

HJ

I just checked the ClassicSkin, works just fine.

PTh

ItemTemplate
Summary Prevent creation of all lowercase topic names.
ReportedBy TWiki:Main.ArthurClemens
Codebase

SVN Range TWiki-4.1, Tue, 28 Nov 2006, build 12081
AppliesTo Engine
Component

Priority Enhancement
CurrentState Closed
WaitingFor

Checkins 12262 12268 12269 12347
TargetRelease minor
Edit | Attach | Watch | Print version | History: r23 < r22 < r21 < r20 < r19 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r23 - 2007-01-16 - JasonHill
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback