Problem with creating ticket

Hi!

I try create new ticket but get next problem:

System error
error: Can’t call method “Id” on an undefined value at
/usr/lib/rt/RT/Interface/Web.pm line 1105.
context:

1099:
1100: # Build up a list of objects that we want to work with
1101: my %custom_fields_to_mod;
1102: foreach my $arg ( keys %$ARGSRef ) {
1103: if ( $arg =~ /^Object-([\w:]+)-(\d*)-CustomField-(\d+)-/
) {
1104: # For each of those objects, find out what custom fields
we want to work with.
1105: $custom_fields_to_mod{$1}{$2 || $args{‘Object’}->Id}{$3}
= 1;
1106: }
1107: }

code stack: /usr/lib/rt/RT/Interface/Web.pm:1103
/usr/lib/rt/RT/Interface/Web.pm:1092
/var/www/html/rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
/var/www/html/rt/Elements/Callback:70
/var/www/html/rt/Ticket/Display.html:149
/var/www/html/rt/Ticket/Create.html:289
/var/www/html/rt/autohandler:215

Can anybody help?

WBR, Krasavin Andrey

Hi!

I try create new ticket but get next problem:

System error
error: Can’t call method “Id” on an undefined value at
/usr/lib/rt/RT/Interface/Web.pm line 1105.
context:

1099:
1100: # Build up a list of objects that we want to work with
1101: my %custom_fields_to_mod;
1102: foreach my $arg ( keys %$ARGSRef ) {
1103: if ( $arg =~ /^Object-([\w:]+)-(\d*)-CustomField-(\d+)-/
) {
1104: # For each of those objects, find out what custom fields
we want to work with.
1105: $custom_fields_to_mod{$1}{$2 || $args{‘Object’}->Id}{$3}
= 1;
1106: }
1107: }

code stack: /usr/lib/rt/RT/Interface/Web.pm:1103
/usr/lib/rt/RT/Interface/Web.pm:1092
/var/www/html/rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
/var/www/html/rt/Elements/Callback:70
/var/www/html/rt/Ticket/Display.html:149
/var/www/html/rt/Ticket/Create.html:289
/var/www/html/rt/autohandler:215

Can anybody help?

Did you modify Web.pm? 1105 has some syntax errors. What version of RT?

Did you modify Web.pm? 1105 has some syntax errors. What version of RT?

No, didn’t. i use 3.4.1 version.

WBR, Krasavin Andrey

Did you modify Web.pm? 1105 has some syntax errors. What version of RT?
Actually, there are no syntax errors there – that line is as it appears
in the repository. The problem is most probably:

code stack: /usr/lib/rt/RT/Interface/Web.pm:1103
/usr/lib/rt/RT/Interface/Web.pm:1092
/var/www/html/rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/var/www/html/rt/Elements/Callback:70
/var/www/html/rt/Ticket/Display.html:149
/var/www/html/rt/Ticket/Create.html:289
/var/www/html/rt/autohandler:215

…that is, you have a custom callback installed locally. It is calling
into the RT API incorrectly. Fix that file, and you’ll fix your
problem.

  • Alex

/var/www/html/rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

…that is, you have a custom callback installed locally. It is calling
into the RT API incorrectly. Fix that file, and you’ll fix your
problem.

  • Alex

Can you help me how can i fix this file?

WBR, Krasavin Andrey

Can anybody help me? In present day i cann’t create ticket and
hence RT loses it’s sense :(.

WBR, Krasavin Andrey

/var/www/html/rt/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

…that is, you have a custom callback installed locally. It is calling
into the RT API incorrectly. Fix that file, and you’ll fix your
problem.

  • Alex

Can you help me how can i fix this file?

You should talk to whoever wrote the file, and get them to fix it. You
can try posting it to the mailing list and seeing if anyone is nice
enough to debug it for you. Or you can delete the file, if you don’t
need whatever functionality it is trying to offer.

  • Alex

You should talk to whoever wrote the file, and get them to fix it. You
can try posting it to the mailing list and seeing if anyone is nice
enough to debug it for you. Or you can delete the file, if you don’t
need whatever functionality it is trying to offer.

  • Alex

That file in attach.

WBR, Krasavin Andrey

BeforeDisplay (120 Bytes)

Version: 3.4.1

When I try create new ticket via the web GUI, I get the following error:

error: Can’t call method “Id” on an undefined value at
/opt/rt/3.4.1/lib/RT/Interface/Web.pm line 1105.
context:

1099:
1100: # Build up a list of objects that we want to work with
1101: my %custom_fields_to_mod;
1102: foreach my $arg ( keys %$ARGSRef ) {
1103: if ( $arg =~ /^Object-([\w:]+)-(\d*)-CustomField-(\d+)-/ ) {
1104: # For each of those objects, find out what custom fields we want
to work with.
1105: $custom_fields_to_mod{$1}{$2 || $args{‘Object’}->Id}{$3} = 1;
1106: }
1107: }

code stack: /opt/rt/3.4.1/lib/RT/Interface/Web.pm:1103
/opt/rt/3.4.1/lib/RT/Interface/Web.pm:1092
/opt/rt/3.4.1/local/html/Callbacks/CustomFields/Ticket/Display.html/BeforeDisplay:3
/opt/rt/3.4.1/share/html/Elements/Callback:70
/opt/rt/3.4.1/share/html/Ticket/Display.html:148
/opt/rt/3.4.1/share/html/Ticket/Create.html:289
/opt/rt/3.4.1/share/html/autohandler:215

The error occured after I implemented the callBack based solution for
editing custom fields as described on the wiki
(Request Tracker Wiki)