Priority: Low
Current State: Confirmed
Released In: n/a
Target Release: n/a
Before updating to Foswiki (from old TWiki installation), form fields defined as
| *Name* | *Type* | *Size* | *Values* | *Tooltip message* | *Attributes* |
| [[AllDbConnectCode][--DB_CONNECT_CODE]] | select | 1 | | Select the DB_CONNECT_CODE | |
were saved as
%META:FIELD{name="DB_CONNECT_CODE" attributes="" title="--DB_CONNECT_CODE" value="xxx"}%
After they update they are saved as
%META:FIELD{name="DB_CONNECT_CODE" attributes="" title="[[AllDbConnectCode][--DB_CONNECT_CODE]]" value="xxx"}%
(Please note the change in the title)
Therefore all our references, for example
* Set V_DB_CONNECT_CODE = %FORMFIELD{"--DB_CONNECT_CODE" topic="%TOPIC%" format="$value"}%
stopped to work.
Before --DB_CONNECT_CODE was found because name and title were searched and the search matched by the title. Now the title of the stored field changed and the formfiled search does not suceed anymore.
--
SimonKlempert
Some info is missing in your description...
--
ArthurClemens - 18 Sep 2009
Sorry, information was removed during save.
--
SimonKlempert - 21 Sep 2009
From IRC this fix is proposed (author classifies this as hack)
REF
http://irclogs.foswiki.org/bin/irclogger_log/foswiki?date=2009-12-04,Fri&sel=217#l213
--- Render.pm.dist 2009-06-21 23:22:25.000000000 +0200
+++ Render.pm 2009-09-18 12:29:48.472320000 +0200
-999,6 +999,16 @@
foreach my $field (@fields) {
my $name = $field->{name};
$title = $field->{title} || $name;
+
+ # Spaced-out Wiki words with alternative link text
+ # i.e. [[$1][$3]]
+ # These might be contained now in the title of form fields
+ my ($double_bracket_link, undef, $double_bracket_title) =
+ $title =~ /\[\[([^\]\[\n]+)\](\[([^\]\n]+)\])?\]/;
+ if (defined $double_bracket_title && $double_bracket_title) {
+ $title = $double_bracket_title;
+ }
+
if ( $title eq $formField || $name eq $formField ) {
$found = 1;
$text =~ s/\$title/$title/go;
I include it now because IRC is a thing that gets lost quickly
--
KennethLavrsen - 04 Dec 2009
INHO this is a case where trying to achieve compatibility would be a mistake.
VarFORMFIELD clearly documents that it uses the
name of the formfield - not the
title, the
name. I appreciate the distinction is thin in many people's eyes, but it's there, and I regard the looking up of the title as a bug. The title is a visual representation only, and should never be used in looking up the value of a field.
I don't propose to fix
FORMFIELD, as it is deprecated in favour of
QUERY. But I'll leave it open, at Low priority, in case someone is motivated to fix it properly.
--
CrawfordCurrie - 25 Jun 2010