RTFM: Mason Error after adding a FreeFormSingle field to an RT cl ass

[I’m new to RT/RTFM. Should I file this as a bug?]

I added a FreeFormSingle custom field to RTFM called “Response Code” and
enabled the field for an existing class.

After do so, I get a Mason error when trying to add an new article or modify
and existing article in that class.

TextSingle seems to work fine. Is this a known bug, or am I missing
something?

When the page renders, the following problems occur:

  • The new FreeFormSingle single field contains the value “<p
    align=”

System error

error: Can’t call method “Content” on an undefined value at
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomField line 3.

context:
1: % if ($CustomFieldObj->Type eq ‘FreeformSingle’) {
2: <input name=“Article-<%$id%>-CustomField-<%$CustomFieldObj->Id%>-Value"
3: value=”<%$Values->First->Content%>">
4: % }
5: % elsif ($CustomFieldObj->Type eq ‘FreeformMultiple’) {
6:
7: %while (my $value = $Values->Next ) {

code stack:
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomField:3
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomFields:28
/usr/local/rt3/share/html/RTFM/Article/Edit.html:39
/usr/local/rt3/share/html/autohandler:195

raw error

Can’t call method “Content” on an undefined value at
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomField line 3.

Trace begun at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Exceptions.pm
line 131
HTML::Mason::Exceptions::rethrow_exception(‘Can’t call method “Content” on
an undefined value at
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomField line 3.^J’)
called at /usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomField
line 3
HTML::Mason::Commands::ANON(‘CustomFieldObj’,
‘RT::FM::CustomField=HASH(0x9a8e55c)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘ArticleObj’,
‘RT::FM::Article=HASH(0x99d2804)’, ‘Content’, undef, ‘id’, ‘new’,
‘ArticleObj’, ‘RT::FM::Article=HASH(0x99d2804)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘Class’, 3, ‘id’, ‘new’, ‘CFContent’,
‘HASH(0x9a2969c)’) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9a81a9
0)’, ‘CustomFieldObj’, ‘RT::FM::CustomField=HASH(0x9a8e55c)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘ArticleObj’,
‘RT::FM::Article=HASH(0x99d2804)’, ‘Content’, undef, ‘id’, ‘new’,
‘ArticleObj’, ‘RT::FM::Article=HASH(0x99d2804)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘Class’, 3, ‘id’, ‘new’, ‘CFContent’,
‘HASH(0x9a2969c)’) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, ‘CustomFieldObj’,
‘RT::FM::CustomField=HASH(0x9a8e55c)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘ArticleObj’,
‘RT::FM::Article=HASH(0x99d2804)’, ‘Content’, undef, ‘id’, ‘new’,
‘ArticleObj’, ‘RT::FM::Article=HASH(0x99d2804)’, ‘ClassObj’,
‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘Class’, 3, ‘id’, ‘new’, ‘CFContent’,
‘HASH(0x9a2969c)’) called at
/usr/local/rt3/share/html/RTFM/Article/Elements/EditCustomFields line 28
HTML::Mason::Commands::ANON(‘ArticleObj’,
‘RT::FM::Article=HASH(0x99d2804)’, ‘CFContent’, ‘HASH(0x9a2969c)’,
‘ClassObj’, ‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘id’, ‘new’, ‘Class’, 3) called
at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9a6f70
4)’, ‘ArticleObj’, ‘RT::FM::Article=HASH(0x99d2804)’, ‘CFContent’,
‘HASH(0x9a2969c)’, ‘ClassObj’, ‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘id’, ‘new’,
‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, ‘ArticleObj’,
‘RT::FM::Article=HASH(0x99d2804)’, ‘CFContent’, ‘HASH(0x9a2969c)’,
‘ClassObj’, ‘RT::FM::Class=HASH(0x9a2a1a0)’, ‘id’, ‘new’, ‘Class’, 3) called
at /usr/local/rt3/share/html/RTFM/Article/Edit.html line 39
HTML::Mason::Commands::ANON(‘Class’, 3, ‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9a5c8d
4)’, ‘Class’, 3, ‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 1074
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, ‘Class’, 3, ‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 760
HTML::Mason::Request::call_next(‘HTML::Mason::Request::ApacheHandler=HASH(0x
99ff188)’, ‘Class’, 3) called at /usr/local/rt3/share/html/autohandler line
195
HTML::Mason::Commands::ANON(‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Component.pm line 134
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x92c3af
0)’, ‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 1069
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 1068
HTML::Mason::Request::comp(undef, undef, undef, ‘Class’, 3) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 338
eval {…} at /usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/Request.pm
line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x99ff1
88)’) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/ApacheHandler.pm line 134
eval {…} at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/ApacheHandler.pm line 134
HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandl
er=HASH(0x99ff188)’) called at
/usr/local/lib/perl5/site_perl/5.8.3/HTML/Mason/ApacheHandler.pm line 792
HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(
0x93078a8)’, ‘Apache=SCALAR(0x9916c50)’) called at
/usr/local/rt3/bin/webmux.pl line 134
eval {…} at /usr/local/rt3/bin/webmux.pl line 134
RT::Mason::handler(‘Apache=SCALAR(0x9916c50)’) called at /dev/null line 0
eval {…} at /dev/null line 0

I added a FreeFormSingle custom field to RTFM called “Response Code”
and enabled the field for an existing class.

After do so, I get a Mason error when trying to add an new article or
modify and existing article in that class.

Try 2.0.3rc6 and see if it fixes this issue?

PGP.sig (186 Bytes)