[rt-users] Custom field content not loading

James McTavish jmctavish at matrixorbital.ca
Thu Mar 22 17:42:56 EDT 2007


Recently I've upgraded to 3.6.3 and custom fields have stopped  
working.  The error it gives me is:

error:   	Can't call method "Content" on an undefined value at /var/ 
www/rt/htdocs/rt/Elements/ShowCustomFields line 89, <GEN19> line 100.
context:  	
...  	
85:  	);
86:  	if ( $m->comp_exists( $comp ) ) {
87:  	$m->comp( $comp, Object => $value );
88:  	} else {
89:  	$m->print( $value->Content );
90:  	}
91:  	$m->out('</a>') if $linked;
92:  	
93:  	# This section automatically populates a div with the  
"IncludeContentForValue" for this custom
...  	
code stack:  	/var/www/rt/htdocs/rt/Elements/ShowCustomFields:89
/var/www/rt/htdocs/rt/Ticket/Elements/ShowCustomFields:46
/var/www/rt/htdocs/rt/Ticket/Elements/ShowSummary:59
/var/www/rt/htdocs/rt/Widgets/TitleBox:49
/var/www/rt/htdocs/rt/Ticket/Elements/ShowSummary:60
/var/www/rt/htdocs/rt/Ticket/Display.html:56
/var/www/rt/htdocs/rt/Widgets/TitleBox:49
/var/www/rt/htdocs/rt/Ticket/Display.html:57
/var/www/rt/htdocs/rt/autohandler:292

It seems that there is no "Content" field in $value.  I traced the  
problem back to Line 1860 of Record.pm in the  
LoadCustomFieldByIdentifier sub:

     elsif ($field =~ /^\d+$/) {
         $cf = RT::CustomField->new($self->CurrentUser);
         $cf->Load($field);
     } else {

And the $cf->Load($field) isn't working to what I expect.  $field is  
defined and correct, but there is no 'Content' field, or even  
anything with what the custom field should contain.  I'm at a loss  
from this point.  I'm not sure which Load is being called, so I'm  
unable to trace it back any further.

Any help would be greatly appreciated.
--
James McTavish
Director of Research and Development
Matrix Orbital
(403)229-2737x160





More information about the rt-users mailing list