• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 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.

In Cairo you could define variable that were lower, mixed or upper case.

In Dakar it only works with uppercase. It breaks a lot of topics where people have defined variables.

It turns out to be a pretty big problem for us. I do not know why the users took so long to report it to me. I got it from several during a training session.

We should get this back working like in Cairo.

Test case. The 4 variables below all expands in Cairo!

  • Set variable = lowcase
  • Set Variable = mixcase
  • Set VariableName = wikiword
  • Set VARIABLEVAR = uppercase





You have to copy the test case to a real topic because the variable setting does not work in a form.


ML pointed out on #twiki that the bug probably relates to line in 401 in TWiki.pm

    # %TAG% name
    $regex{tagNameRegex} = qr/[$regex{upperAlpha}][$regex{upperAlphaNum}_:]*/o;

Thanks Franz for adding the case to the report.


Thanks to ML I could change the line of code so that TWiki4 accepts mixed case variables like Cairo does.

Here is the patch that does so. I will continue testing to see if it breaks something else.

Index: TWiki.pm
--- TWiki.pm    (revision 9317)
+++ TWiki.pm    (working copy)
@@ -398,7 +398,7 @@
     $regex{mixedAlphaNumRegex} = qr/[$regex{mixedAlphaNum}]*/o;

     # %TAG% name
-    $regex{tagNameRegex} = qr/[$regex{upperAlpha}][$regex{upperAlphaNum}_:]*/o;
+    $regex{tagNameRegex} = qr/[$regex{mixedAlpha}][$regex{mixedAlphaNum}_:]*/o;

     # Set statement in a topic
     $regex{bulletRegex} = qr/^(?:\t|   )+\*/;


My first fix on SVN. Blind chicken can also find a grain.

SVN TWiki4: 9323, SVN DEVELOP 9324


TWiki:Main.MartinCleaver spottet that I had missed that numbers are also allowed. So I should have changed the second upperAlphaNum to mixedAlphaNum.

This is corrected in SVN 9326 and SVN 9327

Thanks Martin


Several on #twiki did not know that you could have lower case letters and numbers and '_' in twiki variables. And for a good reason because it has never been documented.

I have added a short definition of the rules in TWikiVariables

I have additionally added an automatic integration test case in the TestCases web on both DEVELOP and Twiki4 branches: TestCaseAutoVariableNames

SVN 9371 and 9372


Closed with release of 4.0.2


Summary Compatibility issue: variables only work when upper case.
ReportedBy TWiki:Main.KennethLavrsen

SVN Range Mon, 13 Mar 2006 build 9258
AppliesTo Engine

Priority Urgent
CurrentState Closed

Checkins 9323 9324 9326 9327 9371 9372
TargetRelease patch
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2006-04-01 - KennethLavrsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback