Tags:
create new tag
view all tags
I am getting the Support.VariablesNotEvaluating problem in the TWiki Dec 2000 release - have upgraded from Perl 5.005_03 to Perl 5.6.1 and this has not fixed the problem, and it's not at all clear how I need to build Perl from source to get this release working. (More details in Support.VariablesNotEvaluating.)

I am running the May 2000 Twiki release on the same server, using Perl 5.005_03, and have tested it with Perl 5.6.1, which works fine with May 2000. The problem only occurs with the Dec 2000 release - I'd appreciate it if a developer could take a look at this issue and try to define exactly how to work around this problem.

I would really like to upgrade to the Dec 2000 release and have been stuck for some time on this. I had a look at the wikiprefs.pm code but it's a bit beyond my level of Perl smile

It would be worth adding this issue to KnownIssuesOfTWiki01Dec2000.

-- RichardDonkin - 16 May 2001

Probably going to need more details on this problem. Is it possible to get a list of all the variables that dont evaluate properly. The TWikiVariables might be useful for getting a list of variables avaliable.

Also does the latest beta version have the same issues?

-- NicholasLee - 16 May 2001

I have attached the TWiki.TWikiVariables page and the Main.WebHome page - here's a summary:

  • variables appearing in templates are never substituted, at least in standard templates
  • %TWIKIWEB% is never substituted - e.g. see the WebHome page and TWikiVariables
  • some variables are substituted OK - e.g. see the WebHome page where all non-TWiki06x01 variables in body of page do work, e.g. the ones for the preferences and stats pages.

I haven't tried the latest beta - I'd like to get this working first if possible, since it's a production release.

-- RichardDonkin - 17 May 2001

From your attached files I can see that the variables in wikicfg.pm are fine, but that the preferences variables are not expanded.

You can do some debugging: Assuming the 01 Dec 2000 release, the wikiprefs.pm library does handle preferences. Use the debugger (or insert debug statements) to see if the preferences variables have been initialized at the end of sub initializePrefs: The array of variables names is @prefsKeys, the array of values is @prefsValues.

In case they are initialized then it must be the variable substitution:

# =========================
sub handlePreferencesTags
{
	 # modify argument directly, e.g. call by reference
	 my $x;
	 my $cmd;
	 for( $x = 0; $x < @wiki::prefsKeys; $x++ ) {
		  $cmd = "\$_[0] =~ s/%$prefsKeys[$x]%/&prvHandlePrefsValue($x)/geo;";
		  eval( $cmd );
	 }

	 if( $_[0] =~ /%VAR{(.*?)}%/ ) {
		  # handle web specific variables
		  $_[0] =~ s/%VAR{(.*?)}%/&prvHandleWebVariable($1)/geo;
	 }
}

May be eval( $cmd ); fails on your system?

-- PeterThoeny - 17 May 2001

After a bit of fun with writeDebug I got nearer to the bottom of this - the bug appeared to be somewhere in prvGetPrefsList ... First of all, it seemed there was a partial workaround, which was to edit TWikiPreferences so that the value of the %WIKIWEBLIST% variable is all on one line, e.g. (this is meant to be all one long line...)

   * Set WIKIWEBLIST = <a href="%WIKIHOMEURL%">%WIKITOOLNAME%</a> . { <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%MAINWEB%/WebHome">Main</a> | <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%TWIKIWEB%/WebHome">TWiki</a> | <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/Know/WebHome">Know</a> | <a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/Sandbox/WebHome">Sandbox</a> }

As soon as I did this, the WIKIWEBLIST, WIKIWEBMASTER and WEBCOPYRIGHT variables all started working OK.

However, the TWIKIWEB variable was still not being substituted. It turned out that this problem is all because I copied the old May2000 version of wikicfg.pm straight into the Dec2000 directory (hits head...) - this was missing the TWIKIWEB setting, which is probably what messed up the WIKIWEBLIST setting.

Now that I have the TWIKIWEB set in wikicfg.pm, everything is working fine. This is not a bug, although it would be good if a check for the TWIKIWEB variable was added to testenv and TWikiVariables.

-- RichardDonkin - 17 May 2001

I've updated TWiki.TWikiVariables to list %TWIKIWEB%, which would make this bug more obvious - should really be in testenv as well.

-- RichardDonkin - 22 Jul 2001

TopicClassification:
BugResolved
Topic attachments
I Attachment History Action Size Date Who Comment
HTMLhtm Main-WebHome.htm   manage 4.9 K 2001-05-17 - 09:40 UnknownUser <nop>Main.WebHome page
HTMLhtm TWikiVariables.htm   manage 13.4 K 2001-05-17 - 09:40 UnknownUser <nop>TWikiVariables page
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2001-07-22 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.