Item1385: i'm confused by IF and QUERY again?

pencil
Priority: Normal
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: CrawfordCurrie
%SEARCH{
   "defined 'SITEMAPWHAT'"
   topic="WebPreferences"
   web="all"
   type="query"
   nonoise="on"
   format="   * $web"
}%
---
%IF{"defined 'SITEMAPWHAT'" then="SITEMAPWHAT is defined" else="SITEMAPWHAT is not defined"}%
---
%SEARCH{
   "preferences[name='SITEMAPWHAT']"
   topic="WebPreferences"
   web="all"
   type="query"
   nonoise="on"
   format="   * $web"
}%

Could not perform search. Error was: Missing operator in 'defined 'SITEMAPWHAT''
SITEMAPWHAT is not defined

-- SvenDowideit - 29 Mar 2009

defined is not defined for a query. It's a conditional operating on a static value (a macro or URL parameter). It's something I regret ever adding.

If defined were defined for a search query, it would be a function operating on a value identified by a TOM path, returning a boolean. But it isn't.

-- CrawfordCurrie - 02 Apr 2009

ItemTemplate edit

Summary i'm confused by IF and QUERY again?
ReportedBy SvenDowideit
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r2 - 02 Apr 2009, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy