[rt-users] Ticket Errors

Ruslan Zakirov ruslan.zakirov at gmail.com
Thu Feb 8 22:41:54 EST 2007


I'm just trying to help you figure out what had happened with your
tickets and as well gather debug info to  fix shredder.

To get debug infon you have to run the following query from mysql or
Pg shell, but first of all you should find a ticket that generate that
error you posted and replace XXXXX with the ticket's ID.

SELECT u.Name, txn.Field, txn.NewValue, txn.ReferenceType,
txn.NewReference, t.id
tid FROM Tickets t JOIN Transactions txn ON txn.Type = 'AddWatcher'
AND txn.ObjectType = 'RT::Ticket' AND txn.ObjectId = t.id LEFT JOIN
Users u ON u.id = txn.NewValue WHERE t.id = XXXXX;

This query selects all AddWatcher transactions from the ticket and
shows if user that's been added as watcher still exist in the DB.


On 2/9/07, Mathew Snyder <theillien at yahoo.com> wrote:
> This query has me confused.  There are lowercase letters placed by themselves in
> locations I'm not used to seeing criteria placed.  Can someone please clarify
> what I'm supposed to enter?
>
> Mathew
>
>
> Ruslan Zakirov wrote:
> > Please, run the following SQL query:
> > SELECT u.Name, txn.Field, txn.ReferenceType, txn.NewReference, t.id
> > tid FROM Tickets t JOIN Transactions txn ON txn.Type = 'AddWatcher'
> > AND txn.ObjectType = 'RT::Ticket' AND txn.ObjectId = t.id LEFT JOIN
> > Users u ON u.id = txn.NewValue WHERE t.id = XXXXX;
> >
> > Where XXXX id of the ticket. Then send me results.
> >
> >
> > On 2/7/07, Mathew Snyder <theillien at yahoo.com> wrote:
> >> I'd like to add to this.  I've looked at the database and found that
> >> there are
> >> 63 transactions attached to this ticket.  There are also no
> >> transactions for
> >> which there isn't a user.  I've looked up the names on each user id in
> >> the
> >> transactions table and found that they correspond to someone that
> >> would likely
> >> have had a part in the ticket.
> >>
> >> There are as many user id entries as there are transactions.  What I
> >> mean is,
> >> there are multiple entries for some ids but all transactions have a
> >> user id
> >> attached to it.  This tells me that the transactions aren't corrupted
> >> by a
> >> missing user that possibly got Shredded out of the database.
> >>
> >> As I've said before, this isn't the first time we've seen this so I'm
> >> beginning
> >> to think this is a bug of some sort.
> >>
> >> The full error follows.
> >>
> >> error:          Can't call method "Name" on an undefined value at
> >> /usr/local/rt-3.6.1//lib/RT/Transaction_Overlay.pm line 690.
> >> context:
> >> ...
> >> 686:    AddWatcher => sub {
> >> 687:    my $self = shift;
> >> 688:    my $principal = RT::Principal->new($self->CurrentUser);
> >> 689:    $principal->Load($self->NewValue);
> >> 690:    return $self->loc( "[_1] [_2] added", $self->Field,
> >> $principal->Object->Name);
> >> 691:    },
> >> 692:    DelWatcher => sub {
> >> 693:    my $self = shift;
> >> 694:    my $principal = RT::Principal->new($self->CurrentUser);
> >> ...
> >> code stack:     /usr/local/rt-3.6.1/lib/RT/Transaction_Overlay.pm:690
> >> /usr/local/rt-3.6.1/lib/RT/Transaction_Overlay.pm:602
> >> /usr/local/rt-3.6.1/share/html/Ticket/Elements/ShowTransaction:54
> >> /usr/local/rt-3.6.1/share/html/Ticket/Elements/ShowHistory:102
> >> /usr/local/rt-3.6.1/share/html/Ticket/Display.html:63
> >> /usr/local/rt-3.6.1/share/html/autohandler:279
> >>
> >>
> >>
> >> raw error
> >> Can't call method "Name" on an undefined value at
> >> /usr/local/rt-3.6.1//lib/RT/Transaction_Overlay.pm line 690.
> >>
> >>
> >> Trace begun at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Exceptions.pm line 129
> >> HTML::Mason::Exceptions::rethrow_exception('Can\'t call method "Name"
> >> on an
> >> undefined value at /usr/local/rt-3.6.1//lib/RT/Transaction_Overlay.pm
> >> line
> >> 690.^J') called at /usr/local/rt-3.6.1/lib/RT/Transaction_Overlay.pm
> >> line 690
> >> RT::Transaction::__ANON__('RT::Transaction=HASH(0xc706568)') called at
> >> /usr/local/rt-3.6.1/lib/RT/Transaction_Overlay.pm line 602
> >> RT::Transaction::BriefDescription('RT::Transaction=HASH(0xc706568)')
> >> called at
> >> /usr/local/rt-3.6.1/share/html/Ticket/Elements/ShowTransaction line 54
> >> HTML::Mason::Commands::__ANON__('Attachments',
> >> 'RT::Attachments=HASH(0xc99b5f0)', 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)',
> >> 'AttachmentContent', 'RT::Attachments=HASH(0xc98d840)', 'ShowHeaders',
> >> undef,
> >> 'Collapsed', undef, 'Tickets', undef, 'AttachPath', '/Ticket/Attachment',
> >> 'UpdatePath', '/Ticket/Update.html', 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)',
> >> 'Transaction', 'RT::Transaction=HASH(0xc706568)', 'ShowHeaders', undef,
> >> 'Collapsed', undef, 'RowNum', 23, 'ShowTitleBarCommands', 1,
> >> 'Attachments',
> >> 'ARRAY(0xc59f11c)', 'AttachmentContent', 'HASH(0xc6a31d4)',
> >> 'LastTransaction',
> >> 0) called at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Component.pm
> >> line 135
> >> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbf6c9a0)',
> >>
> >> 'Attachments', 'RT::Attachments=HASH(0xc99b5f0)', 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)', 'AttachmentContent',
> >> 'RT::Attachments=HASH(0xc98d840)', 'ShowHeaders', undef, 'Collapsed',
> >> undef,
> >> 'Tickets', undef, 'AttachPath', '/Ticket/Attachment', 'UpdatePath',
> >> '/Ticket/Update.html', 'Ticket', 'RT::Ticket=HASH(0xc54ce28)',
> >> 'Transaction',
> >> 'RT::Transaction=HASH(0xc706568)', 'ShowHeaders', undef, 'Collapsed',
> >> undef,
> >> 'RowNum', 23, 'ShowTitleBarCommands', 1, 'Attachments',
> >> 'ARRAY(0xc59f11c)',
> >> 'AttachmentContent', 'HASH(0xc6a31d4)', 'LastTransaction', 0) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm line 1251
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 1245
> >> HTML::Mason::Request::comp(undef, undef, 'Attachments',
> >> 'RT::Attachments=HASH(0xc99b5f0)', 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)',
> >> 'AttachmentContent', 'RT::Attachments=HASH(0xc98d840)', 'ShowHeaders',
> >> undef,
> >> 'Collapsed', undef, 'Tickets', undef, 'AttachPath', '/Ticket/Attachment',
> >> 'UpdatePath', '/Ticket/Update.html', 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)',
> >> 'Transaction', 'RT::Transaction=HASH(0xc706568)', 'ShowHeaders', undef,
> >> 'Collapsed', undef, 'RowNum', 23, 'ShowTitleBarCommands', 1,
> >> 'Attachments',
> >> 'ARRAY(0xc59f11c)', 'AttachmentContent', 'HASH(0xc6a31d4)',
> >> 'LastTransaction',
> >> 0) called at
> >> /usr/local/rt-3.6.1/share/html/Ticket/Elements/ShowHistory line 102
> >> HTML::Mason::Commands::__ANON__('Ticket', 'RT::Ticket=HASH(0xc54ce28)',
> >> 'Tickets', undef, 'Collapsed', undef, 'ShowHeaders', undef,
> >> 'Attachments',
> >> 'RT::Attachments=HASH(0xc99b5f0)', 'AttachmentContent',
> >> 'RT::Attachments=HASH(0xc98d840)') called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Component.pm line 135
> >> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbf63114)',
> >>
> >> 'Ticket', 'RT::Ticket=HASH(0xc54ce28)', 'Tickets', undef, 'Collapsed',
> >> undef,
> >> 'ShowHeaders', undef, 'Attachments', 'RT::Attachments=HASH(0xc99b5f0)',
> >> 'AttachmentContent', 'RT::Attachments=HASH(0xc98d840)') called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm line 1251
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 1245
> >> HTML::Mason::Request::comp(undef, undef, 'Ticket',
> >> 'RT::Ticket=HASH(0xc54ce28)',
> >> 'Tickets', undef, 'Collapsed', undef, 'ShowHeaders', undef,
> >> 'Attachments',
> >> 'RT::Attachments=HASH(0xc99b5f0)', 'AttachmentContent',
> >> 'RT::Attachments=HASH(0xc98d840)') called at
> >> /usr/local/rt-3.6.1/share/html/Ticket/Display.html line 63
> >> HTML::Mason::Commands::__ANON__('id', 55767, 'id', 55767) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Component.pm line 135
> >> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbbdd85c)',
> >>
> >> 'id', 55767, 'id', 55767) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm line 1251
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 1245
> >> HTML::Mason::Request::comp(undef, undef, 'id', 55767, 'id', 55767)
> >> called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm line 914
> >> HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0xc99be60)',
> >>
> >> 'id', 55767) called at /usr/local/rt-3.6.1/share/html/autohandler line
> >> 279
> >> HTML::Mason::Commands::__ANON__('id', 55767) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Component.pm line 135
> >> HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0xbb4ad10)',
> >>
> >> 'id', 55767) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 1246
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 1245
> >> HTML::Mason::Request::comp(undef, undef, undef, 'id', 55767) called at
> >> /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm line 459
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 459
> >> eval {...} at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/Request.pm
> >> line 411
> >> HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0xc99be60)')
> >>
> >> called at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/ApacheHandler.pm
> >> line 168
> >> HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0xc99be60)')
> >>
> >> called at /usr/lib/perl5/vendor_perl/5.8.7/HTML/Mason/ApacheHandler.pm
> >> line 826
> >> HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0xb0c1e5c)',
> >>
> >> 'Apache2::RequestRec=SCALAR(0xc98d78c)') called at
> >> /usr/local/rt-3.6.1/bin/webmux.pl line 123
> >> eval {...} at /usr/local/rt-3.6.1/bin/webmux.pl line 123
> >> RT::Mason::handler('Apache2::RequestRec=SCALAR(0xc98d78c)') called at
> >> -e line 0
> >> eval {...} at -e line 0
> >>
> >> If we don't protect the freedom of speech, how will we know who the
> >> assholes are?
> >> http://theillien.blogspot.com
> >>
> >>
> >> Mathew Snyder wrote:
> >> > I think I've asked about this before and I'm fairly certain I
> >> already know the
> >> > answer.  However, I'm not certain it should be happening.
> >> >
> >> > We keep getting the error "Can't call method "Name" on an undefined
> >> value..."
> >> > If I recall correctly this is a result of eliminating via Shredder a
> >> user which
> >> > was at one point attatched to a ticket.  The only problem with this
> >> is that the
> >> > only users I remove are those that are created when we receive spam.
> >> >
> >> > So is this the only explanation?  More and more of these tickets
> >> keep appearing
> >> > but I can't figure out how all of these users are disappearing.
> >> >
> >> > Thanks
> >> > Mathew
> >> > _______________________________________________
> >> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >> >
> >> > Community help: http://wiki.bestpractical.com
> >> > Commercial support: sales at bestpractical.com
> >> >
> >> >
> >> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> >> > Buy a copy at http://rtbook.bestpractical.com
> >> >
> >> _______________________________________________
> >> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >>
> >> Community help: http://wiki.bestpractical.com
> >> Commercial support: sales at bestpractical.com
> >>
> >>
> >> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> >> Buy a copy at http://rtbook.bestpractical.com
> >>
> >
> >
>


-- 
Best regards, Ruslan.



More information about the rt-users mailing list