I recently inherited a RT installation, and after upgrading it to 4.2.12 scrips can no longer be created. This happens if someone is trying to create a scrip local to a specific queue or globally. The standard "An internal error has occurred" message is kicked out.
When I look in syslog, I see
[17510] Can't call method "Queue" on an undefined value at /opt/rt4/sbin/../lib/RT/Scrip.pm line 450.#012#012Stack:#012 [/opt/rt4/sbin/../lib/RT/Scrip.pm:450]#012
[/opt/rt4/share/html/Admin/Elements/EditScrip:83]#012
[/opt/rt4/share/html/Widgets/TitleBox:56]#012
[/opt/rt4/share/html/Admin/Elements/EditScrip:89]#012
[/opt/rt4/share/html/Admin/Queues/Scrip.html:52]#012
[/opt/rt4/share/html/Admin/autohandler:49]#012
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:681]#012
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:369]#012
[/opt/rt4/share/html/autohandler:53]#012
Trace begun at /opt/rt4/sbin/../lib/RT.pm line 303#012Log::Dispatch::__ANON__('Log::Dispatch=HASH(0x1601220)', 'Can\'t call method "Queue" on an undefined value at /opt/rt4/sbin/../lib/RT/Scrip.pm line 450.^J^JStack:^J
[/opt/rt4/sbin/../lib/RT/Scrip.pm:450]^J
[/opt/rt4/share/html/Admin/Elements/EditScrip:83]^J
[/opt/rt4/share/html/Widgets/TitleBox:56]^J
[/opt/rt4/share/html/Admin/Elements/EditScrip:89]^J
[/opt/rt4/share/html/Admin/Queues/Scrip.html:52]^J
[/opt/rt4/share/html/Admin/autohandler:49]^J
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:681]^J
[/opt/rt4/sbin/../lib/RT/Interface/Web.pm:369]^J
[/opt/rt4/share/html/autohandler:53]^J') called at /opt/rt4/sbin/../lib/RT/Interface/Web/Handler.pm line 208#012
HTML::Mason::Exception::as_rt_error('HTML::Mason::Exception=HASH(0x7a4ee40)') called at /usr/local/share/perl5/HTML/Mason/Exceptions.pm line 278#012
HTML::Mason::Exception::as_string('HTML::Mason::Exception=HASH(0x7a4ee40)', undef, '') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 567#012
HTML::Mason::Request::_handle_error('RT::Interface::Web::Request=HASH(0x7a36a48)',
HTML::Mason::Exception=HASH(0x7a4ee40)') called at /usr/local/share/perl5/HTML/Mason/Request.pm line 518#012
HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0x7a36a48)') called at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 96#012eval at /usr/local/share/perl5/HTML/Mason/PSGIHandler.pm line 96#012HTML::Mason::Requeue
The offending code is in the Stage() method in Scrip.pm
446 sub Stage {
447 my $self = shift;
448 my %args = ( TicketObj => undef, @_ );
449 my $queue = $args{'TicketObj'}->Queue;
450 my $rec = RT::ObjectScrip->new( $self->CurrentUser );
451 $rec->LoadByCols( Scrip => $self->id, ObjectId => $queue );
452 return $rec->Stage if $rec->id;
453
454 $rec->LoadByCols( Scrip => $self->id, ObjectId => 0 );
455 return $rec->Stage if $rec->id;
456
457 return undef;
458 }
I have verified that $args{'TicketObj'} is what is undefined. I'm a bit stumped with where to go from here. Any help is appreciated.