• 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.

The oops dialog needs to evaluate variables.

Test case Dakar: https://develop.twiki.org/do/oops/Sandbox/TestTopic2?template=oopssaveerr;param1=test+link+to+%TOPIC%+of+%WIKITOOLNAME%

Test case Cairo: http://twiki.org/cgi-bin/oops/Sandbox/SandBox02?template=oopssaveerr;param1=test+link+to+%TOPIC%+of+%WIKITOOLNAME%

This is a Cairo/Dakar incompatibility. For example, the latest BlackListPlugin generates an incomprehensible oops message because the variables are not evaluated: Your IP address %REMOTE_ADDR% is black listed at the %WIKITOOLNAME% web site due to excessive access or suspicious activities. Please contact site administrator %WIKIWEBMASTER% if you got on the list by mistake.

-- PTh

It does evaluate variables, of course. But the order is such that it instantiates parameters after expanding variables. Since your variables are in parameters, they don't get expanded. The reasoning behind this was that parameters to oops should always be nouns, and never sentences of error messages, due to the internationalisation problems this causes.

In the case of BlackListPlugin it ought to define an oops template for the messages it wants to output, rather than hard-coding an English-only message.

To handle this correctly, you actually need a second call to variable expansion, so they are expanded both before and after parameter instantiation.

SVN 7229


Thanks Crawford for fixing this.

Regarding hard-coding an English-only message, au contraire, the parameterized oops template is done for flexibility. The plugin uses only one oops template and fills it dynamically with one of two different messages based on plugins variables. That is, there is no need to ssh to the server to change the message.

-- PTh

Summary Variables not evaluated in oops dialog text
ReportedBy PeterThoeny
AppliesTo Engine
Priority Normal
CurrentState Closed

Checkins 7229
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2005-11-03 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback