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

Item4878: 4.2 IF not complete / crashes

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor 4.2.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


looks like the 4.2.0 IF is not ready for release.

  • ok
  • broken
  • broken
  • ok
  • ok
  • broken
  • broken
  • ok
  • ok
  • ok
  • ok
  • ok

it also seems that topics like CurrentState in the released version of the BugsContrib (which work on 4.1.2 etc) are broken, crashing twiki.

I'm trying to craft some way of detecting and fixing 4.0 and 4.1 backwards compatibilitied in TWikiApps, and this is frown

The broken bullet points, and the extra BR's are inserted erroniously by wysiwyg.

-- TWiki:Main/SvenDowideit - 23 Oct 2007

Most of the above test cases fail due to wrong syntax, according to the code. I fixed the crashes and clarified the documentation to be in line with the code. I am not sure if CDot wants to make work something like

%IF{"defined FOO" then="yes" else="no"}%
instead of
%IF{"defined 'FOO'" then="yes" else="no"}%
that is demand the variable name to be quoted. If so then TWiki::Query::Node::_getField() has to be fixed accordingly. Alas, I can't forsee the implications of such a change in this central function. So I just fixed the docu.

The defined predicate has been fixed also to work for SYSTEMWEB and the like. These are "functionTags" and not url, preference or session parameters. As a sideeffect, you can now check for more function tags, e.g. those registered by plugins.

-- TWiki:Main.MichaelDaum - 24 Oct 2007

trouble is, some of the examples are lifted from released versions of BugsContrib, and so work in 4.0 and 4.1.

-- TWiki:Main.SvenDowideit - 24 Oct 2007

Okay, let's see. isweb and istopic are new in 4.2. So we are left with defined and the question if variable names must be quoted or not.

%IF{"defined MAINWEB" then="ok" else="broken"}%
never worked, as even in 4.0 and 4.1 MAINWEB has been a function tag. That's fixed now.

And yes:

%IF{"defined SYSTEMWEB" then="ok" else="broken"}%
%IF{"defined 'SYSTEMWEB'" then="ok" else="broken"}%
both worked just fine before...

-- TWiki:Main.MichaelDaum - 24 Oct 2007

The tests were up the crrek, and giving false positives. Should be fixed now but COULD SOMEONE PLEASE MERGE TO MAIN!

Not without a brain splits, now that you tackled the issue in TWikiRelease04x02 and I fixed it in MAIN, both different. Please, let's resolve issues in one place - MAIN - completely, and then afterwards merge to the release branch.



No, CDot, first tell me if

%IF{"defined SYSTEMWEB" then="ok" else="broken"}%

is supposed to work. I'll merge when the code is fixed.

-- TWiki:Main.MichaelDaum - 24 Oct 2007

red comments added frown

-- TWiki:Main.MichaelDaum - 24 Oct 2007

I was going to merge Crawfords changes to MAIN when I read this.

Please get the branches in sync asap.

-- TWiki:Main.KennethLavrsen - 24 Oct 2007

Sorry, I'm on the wrong end of a dialup link and merging to both branches is likely to cause errors (tortoise svn is pretty bad for doing merges). Since the priority if for 4.2, I need to make sure I fix it there. Yes, that code is supposed to work, and does work on the 4.2.0 branch (it is covered by a unit testcase)

-- TWiki:Main.CrawfordCurrie - 24 Oct 2007

Okay I will take care of the merge.

-- TWiki:Main.MichaelDaum - 24 Oct 2007

Many thanks, Michael. I dropped this to Normal priority, as it is no longer a release blocker.




Summary 4.2 IF not complete / crashes
ReportedBy TWiki:Main.SvenDowideit
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:15408 TWikirev:15409 TWikirev:15410 TWikirev:15413 TWikirev:15414
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r21 - 2007-10-25 - SvenDowideit
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