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

Item4372: Custom META fields that don't have the name key are ignored by TWiki::Store

Item Form Data

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

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Since Dakar if you have a custom META without a key name, like the following:


It was picked up by TWiki::Store, could be manipulated and it was preserved when saved.

In the latest build, TWiki::Store is only reading the METAs that have the key name, ignoring the rest.

The following patch solves the issue, but I'm not sure if it's a problem of TWiki::Store that must decide how to put a META in the $meta object, or if the semantic of putKeyed should be changed to just "put" if the META doesn't have the key name.

Index: TWiki/Store.pm
===================================================================
--- TWiki/Store.pm      (revision 14423)
+++ TWiki/Store.pm      (working copy)
@@ -1330,7 +1330,10 @@
           if (defined($keys->{name})) {
               # don't attempt to save it keyed unless it has a name
               $meta->putKeyed( $1, $keys);
-          }
+          } else {
+              $meta->put( $1, $keys);
+         }
+
           '';
          )gem;

I put the severity to "Urgent" because this bug broke our main application.

-- TWiki:Main/RafaelAlvarez - 17 Jul 2007

I'll be uploading the Unit Tests for this fix this weekend.

-- TWiki:Main.RafaelAlvarez - 18 Jul 2007

Cleaned "WaitingFor" field.

-- TWiki:Main.GilmarSantosJr - 10 Aug 2008

ItemTemplate
Summary Custom META fields that don't have the name key are ignored by TWiki::Store
ReportedBy TWiki:Main.RafaelAlvarez
Codebase 4.1.2
SVN Range TWiki-4.1.2, Tue, 17 Jul 2007, build 14423
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:14424
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2008-08-10 - GilmarSantosJr
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback