Item2554: META:TOPICPARENT{} is shown as naked macro

pencil
Priority: Urgent
Current State: Closed
Released In:
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: KennethLavrsen
Waiting For:
Last Change By: CrawfordCurrie
it is common that a topic with default parent has this as the 2nd line in the txt file.

%META:TOPICPARENT{}%

Ie an empty value. It maybe be modern Foswiki's put something but old webs are stuffed with these.

Someone have recently changed trunk so that the %META:TOPICPARENT{}% is seen as the naked macro instead of being invisible.

What is more strange is that it is only seen in Firefox and not in IE??!!

-- KennethLavrsen - 02 Jan 2010

Confirmed. I remember Crawford did some changes parsing META:TOPICPARENT in trunk so that these suddenly started showing up. The META parser now considers META:TOPICPARENT{} being "invalid" in some sense.

Afaics, this is not browser specific as this is real data in the markup sent to the browser.

-- MichaelDaum - 03 Jan 2010

Yes, that's not a syntactically valid topicparent, it is missing values that do not have reasonable defaults. The reason I put those checks in was to prevent the scenario where an incomplete %META in a topic was crashing foswiki, when some innocent coder tried to access an attribute that had not been defined.

If this behaviour is unacceptable, then on line 2903 of Foswiki/Meta.pm - return '' instead of $expr. It would be wise to add such an erroneous TOPICPARENT into the unit tests as well.

-- CrawfordCurrie - 19 Jan 2010

It is unacceptable.

We have many of these topics in old webs which means at some point TWiki had a bug that produced these. We have to deal with that. We cannot ignore that if we are serious about telling people they can upgrade from TWiki to Foswiki.

-- KennethLavrsen - 19 Jan 2010

Will this soon be fixed. It annoys me like crazy to see these unresolved macros everywhere. I never know if it is a new bug or this old one.

-- KennethLavrsen - 14 Mar 2010

I changed the rules for TOPICPARENT to allow a name, rather than require it. This allows an empty TOPICPARENT. I visually inspected the code where it is used, and believe that there are no cases where a missing name attribute will crash the code, but it wasn't an exhaustive test.

-- CrawfordCurrie - 15 Mar 2010

ItemTemplate edit

Summary META:TOPICPARENT{} is shown as naked macro
ReportedBy KennethLavrsen
Codebase
SVN Range
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins distro:90d1ab4e02d3
TargetRelease minor
ReleasedIn
Topic revision: r6 - 15 Mar 2010, 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