Item2601: Missing useless 'title' attribute in META:PREFERENCE takes foswiki down

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: CrawfordCurrie
Waiting For:
Last Change By: KennethLavrsen
Way back when META:PREFERENCE was invented, it had three attributes: name, value and title. I have searched and searched, but can't find any documentation or explanation of the title attribute. But if it is missing, it crashes Foswiki in the preferences parser.

When META:PREFERENCEs are parsed, the title attribute has PREFERENCE_ prepended, and is added to the preferences DB. The name attribute is added to the DB as-is. So, if we have a setting such as:
  • Set SNOW = white
then expressed as a META:PREFERENCE this is %META:PREFERENCE{name="SNOW" value="white"}%. When this preference is loaded, we end up with two preferences, the equivalent of:
  • Set SNOW = white
  • Set PREFERENCE_SNOW = white
As far as I can tell this is pointless. But if the title attribute is missing, the parse fails in flames.

trunk already has this fixed by testing whether title is defined or not. Release branch needs the fix too. And MirrorWebPlugin must generate the title attribute, to be compatible with old releases.

-- CrawfordCurrie - 06 Jan 2010

Since the next release is coming from trunk, I'm marking this as ready for 1.1.

-- CrawfordCurrie - 16 Mar 2010

ItemTemplate edit

Summary Missing useless 'title' attribute in META:PREFERENCE takes foswiki down
ReportedBy CrawfordCurrie
Codebase 1.0.8, trunk
SVN Range
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r3 - 04 Oct 2010, KennethLavrsen
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