RT 3.4.3 / Can't locate object method "GetDisplayedNodes" via package "Tree::Simple" at /opt/rt3/share/html/Search/Build.html line 270

Hi RT Users,

since some days i play around with the actual RT 3.4.3, but from time to
time i get the following error if i got to “Tickets” The Query Builder.

Its running under Fedora Core 3 Perl 5.8.5 and installed modules…

Any Ideas or sugestions??? It is strange, this error occurs not on every
call, only from time to time.

System error
error: Can’t locate object method “GetDisplayedNodes” via package
"Tree::Simple" at /opt/rt343/share/html/Search/Build.html line 270.
context:

266: }
267:
268: $Query = “”;
269:
270: my @options = $tree->GetDisplayedNodes;
271:
272: my @current_values = grep { defined } @options[@clauses];
273:
274: # {{{ Try to find if we’re adding a clause

code stack: /opt/rt343/share/html/Search/Build.html:270
/opt/rt343/share/html/autohandler:215
raw error

Can’t locate object method “GetDisplayedNodes” via package “Tree::Simple” at
/opt/rt343/share/html/Search/Build.html line 270.

Trace begun at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Exceptions.pm line
131
HTML::Mason::Exceptions::rethrow_exception(‘Can’t locate object method
"GetDisplayedNodes" via package “Tree::Simple” at
/opt/rt343/share/html/Search/Build.html line 270.^J’) called at
/opt/rt343/share/html/Search/Build.html line 270
HTML::Mason::Commands::ANON at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9dad2f
0)’) called at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line
1074
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef) called at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 760
HTML::Mason::Request::call_next(‘HTML::Mason::Request::CGI=HASH(0xaad6eb0)’)
called at /opt/rt343/share/html/autohandler line 215
HTML::Mason::Commands::ANON at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Component.pm line 136
HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9dd9ac
0)’) called at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line
1069
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 1068
HTML::Mason::Request::comp(undef, undef, undef) called at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 338
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 338
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Request.pm line 297
HTML::Mason::Request::exec(‘HTML::Mason::Request::CGI=HASH(0xaad6eb0)’)
called at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/CGIHandler.pm line 197
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/CGIHandler.pm line
197
HTML::Mason::Request::CGI::exec(‘HTML::Mason::Request::CGI=HASH(0xaad6eb0)’)
called at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/Interp.pm line 216
HTML::Mason::Interp::exec(undef, undef) called at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/CGIHandler.pm line 127
eval {…} at /usr/lib/perl5/site_perl/5.8.5/HTML/Mason/CGIHandler.pm line
127
HTML::Mason::CGIHandler::_handler(‘HTML::Mason::CGIHandler=HASH(0x9b91240)’,
‘HASH(0xaad1910)’) called at
/usr/lib/perl5/site_perl/5.8.5/HTML/Mason/CGIHandler.pm line 76
HTML::Mason::CGIHandler::handle_cgi_object(‘HTML::Mason::CGIHandler=HASH(0x9
b91240)’, ‘CGI::Fast=HASH(0xaaccdec)’) called at
/opt/rt343/bin/mason_handler.fcgi line 76
eval {…} at /opt/rt343/bin/mason_handler.fcgi line 76

Thanks in advance

: Torsten Brumm
: IT Security Engineer
:
: Kuehne + Nagel
: HAM - MI-C
:
: Ferdinand Strasse 29-33
: 20095 Hamburg
:
: +49 (40) 329 15 199
: +49 (40) 329 15 500
:
: torsten.brumm@kuehne-nagel.com
: www.kn-portal.com
: icq: 78258840

Hi RT Users,

since some days i play around with the actual RT 3.4.3, but from time to
time i get the following error if i got to “Tickets” The Query Builder.

Its running under Fedora Core 3 Perl 5.8.5 and installed modules…

Any Ideas or sugestions??? It is strange, this error occurs not on every
call, only from time to time.

I was having the same problem with 3.4.3. I upgraded to 3.4.4
yesterday and haven’t had the problem (yet).

-Todd

Hi RT Users,

since some days i play around with the actual RT 3.4.3, but from time to
time i get the following error if i got to “Tickets” The Query Builder.

Its running under Fedora Core 3 Perl 5.8.5 and installed modules…

Any Ideas or sugestions??? It is strange, this error occurs not on every
call, only from time to time.

I was having the same problem with 3.4.3. I upgraded to 3.4.4
yesterday and haven’t had the problem (yet).

-Todd

I am also experiencing this bug in 3.4.4.

-Todd

Fuck! This can be a big Show Stopper for my Migration. Hoepfully the
Bestpractical Guys knows to fix this…

Thanks in advance

: Torsten Brumm
: IT Security Engineer
:
: Kuehne + Nagel
: HAM - MI-C
:
: Ferdinand Strasse 29-33
: 20095 Hamburg
:
: +49 (40) 329 15 199
: +49 (40) 329 15 500
:
: torsten.brumm@kuehne-nagel.com
: www.kn-portal.com
: icq: 78258840
…Von: todd@chaka.net [mailto:todd@chaka.net]
Gesendet: Freitag, 9. September 2005 22:04
An: HAM-MI-IC Torsten Brumm
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] RT 3.4.3 / Can’t locate object method
"GetDisplayedNodes" via package “Tree::Simple” at
/opt/rt3/share/html/Search/Build.html line 270.

Hi RT Users,

since some days i play around with the actual RT 3.4.3, but from
time to time i get the following error if i got to “Tickets” The Query
Builder.

Its running under Fedora Core 3 Perl 5.8.5 and installed modules…

Any Ideas or sugestions??? It is strange, this error occurs not on
every call, only from time to time.

I was having the same problem with 3.4.3. I upgraded to 3.4.4
yesterday and haven’t had the problem (yet).

-Todd

I am also experiencing this bug in 3.4.4.

-Todd

Fuck! This can be a big Show Stopper for my Migration. Hoepfully the
Bestpractical Guys knows to fix this…

What version of Tree::Simple are you running? Does it occur when
running under standalone_httpd?

  • Alex

Hi Alex,

i use: Tree::Simple v1.15

Other Modules:

Perl v5.8.5 under linux
Apache::Session v1.6;
Apache::Session::Generate::MD5 v2.1;
Apache::Session::lock::MySQL v1.00;
Apache::Session::MySQL v1.01;
Apache::Session::Serialize::Storable v1.00;
Apache::Session::Store::DBI v1.02;
Apache::Session::Store::MySQL v1.04;
AutoLoader v5.60;
base v2.06;
Benchmark v1.06;
bytes v1.01;
Cache::Simple::TimedExpiry v0.23;
Carp v1.03;
CGI v3.05;
CGI::Cookie v1.24;
CGI::Fast v1.05;
CGI::Util v1.5;
Class::Container v0.12;
Class::Data::Inheritable v0.02;
Class::ReturnValue v0.53;
constant v1.04;
Cwd v2.19;
Data::Dumper v2.121;
DBD::mysql v2.9003;
DBI v1.40;
DBIx::SearchBuilder v1.27;
DBIx::SearchBuilder::Unique v0.01;
Devel::StackTrace v1.11;
Devel::StackTraceFrame v0.6;
Digest::base v1.00;
Digest::MD5 v2.33;
DynaLoader v1.05;
Encode v2.01;
Encode::Alias v2.00;
Encode::Config v2.00;
Encode::Encoding v2.00;
Encode::Guess v2.00;
Encode::Unicode v2.00;
Errno v1.09;
Exception::Class v1.21;
Exception::Class::Base v1.2;
Exporter v5.58;
Exporter::Heavy v5.58;
FCGI v0.67;
Fcntl v1.05;
fields v2.03;
File::Basename v2.73;
File::Glob v1.03;
File::Path v1.06;
File::Spec v0.87;
File::Spec::Unix v1.5;
File::Temp v0.14;
FileHandle v2.01;
HTML::Entities v1.27;
HTML::Mason v1.28;
HTML::Mason::CGIHandler v1.00;
HTML::Mason::Exception v1.1;
HTML::Mason::Exception::Abort v1.1;
HTML::Mason::Exception::Compilation v1.1;
HTML::Mason::Exception::Compilation::IncompatibleCompiler v1.1;
HTML::Mason::Exception::Compiler v1.1;
HTML::Mason::Exception::Decline v1.1;
HTML::Mason::Exception::Params v1.1;
HTML::Mason::Exception::Syntax v1.1;
HTML::Mason::Exception::System v1.1;
HTML::Mason::Exception::TopLevelNotFound v1.1;
HTML::Mason::Exception::VirtualMethod v1.1;
HTML::Mason::Exceptions v1.43;
HTML::Parser v3.35;
HTML::Scrubber v0.08;
I18N::LangTags v0.33;
I18N::LangTags::List v0.29;
integer v1.00;
IO v1.21;
IO::File v1.10;
IO::Handle v1.24;
IO::InnerFile v2.110;
IO::Lines v2.110;
IO::Scalar v2.110;
IO::ScalarArray v2.110;
IO::Seekable v1.09;
IO::Wrap v2.110;
IO::WrapTie v2.110;
IPC::Open2 v1.01;
IPC::Open3 v1.0106;
lib v0.5565;
List::Util v1.14;
locale v1.00;
Locale::Maketext v1.09;
Locale::Maketext::Fuzzy v0.02;
Locale::Maketext::Lexicon v0.49;
Locale::Maketext::Lexicon::Gettext v0.14;
Log::Dispatch v2.10;
Log::Dispatch::Base v1.09;
Log::Dispatch::Output v1.26;
Log::Dispatch::Screen v1.17;
Log::Dispatch::Syslog v1.18;
Mail::Address v1.67;
Mail::Field v1.67;
Mail::Field::AddrList v1.67;
Mail::Field::Date v1.67;
Mail::Header v1.67;
Mail::Internet v1.67;
MIME::Base64 v3.01;
MIME::Body v5.417;
MIME::Decoder v5.417;
MIME::Decoder::NBit v5.417;
MIME::Entity v5.417;
MIME::Field::ContDisp v5.417;
MIME::Field::ConTraEnc v5.417;
MIME::Field::ContType v5.417;
MIME::Field::ParamVal v5.417;
MIME::Head v5.417;
MIME::Parser v5.417;
MIME::QuotedPrint v3.01;
MIME::Tools v5.417;
MIME::Words v5.417;
Module::Versions::Report v1.02;
overload v1.01;
Params::Validate v0.77;
POSIX v1.08;
re v0.04;
Regexp::Common v2.120;
Regexp::Common::_support v2.101;
Regexp::Common::balanced v2.101;
Regexp::Common::CC v2.100;
Regexp::Common::comment v2.116;
Regexp::Common::delimited v2.104;
Regexp::Common::lingua v2.105;
Regexp::Common::list v2.103;
Regexp::Common::net v2.105;
Regexp::Common::number v2.108;
Regexp::Common::profanity v2.104;
Regexp::Common::SEN v2.102;
Regexp::Common::URI v2.108;
Regexp::Common::URI::fax v2.100;
Regexp::Common::URI::file v2.100;
Regexp::Common::URI::ftp v2.101;
Regexp::Common::URI::gopher v2.100;
Regexp::Common::URI::http v2.101;
Regexp::Common::URI::news v2.100;
Regexp::Common::URI::pop v2.100;
Regexp::Common::URI::prospero v2.100;
Regexp::Common::URI::RFC1035 v2.100;
Regexp::Common::URI::RFC1738 v2.104;
Regexp::Common::URI::RFC1808 v2.100;
Regexp::Common::URI::RFC2384 v2.102;
Regexp::Common::URI::RFC2396 v2.100;
Regexp::Common::URI::RFC2806 v2.100;
Regexp::Common::URI::tel v2.100;
Regexp::Common::URI::telnet v2.100;
Regexp::Common::URI::tv v2.100;
Regexp::Common::URI::wais v2.100;
Regexp::Common::whitespace v2.103;
Regexp::Common::zip v2.112;
RT v3.4.3;
RT::Interface::Email v1.02;
RTx::AssetTracker v1.2.1;
Scalar::Util v1.14;
SelectSaver v1.00;
Socket v1.77;
Storable v2.13;
strict v1.03;
Symbol v1.05;
Sys::Hostname v1.11;
Sys::Syslog v0.05;
Text::Autoformat v1.13;
Text::Quoted v1.8;
Text::Reform v1.11;
Text::Tabs v98.112801;
Text::Template v1.44;
Text::WikiFormat v0.76;
Text::Wrapper v1.000;
Time::HiRes v1.55;
Time::JulianDay v2003.1125;
Time::Local v1.1;
Time::ParseDate v2003.1126;
Time::Timezone v2003.0211;
Time::Zone v2.22;
Tree::Simple v1.15;
URI v1.30;
URI::Escape v3.22;
URI::URL v5.03;
URI::WithBase v2.19;
utf8 v1.04;
vars v1.01;
warnings v1.03;
warnings::register v1.00;
XSLoader v0.02;

Thanks in advance

: Torsten Brumm
: IT Security Engineer
:
: Kuehne + Nagel
: HAM - MI-C
:
: Ferdinand Strasse 29-33
: 20095 Hamburg
:
: +49 (40) 329 15 199
: +49 (40) 329 15 500
:
: torsten.brumm@kuehne-nagel.com
: www.kn-portal.com
: icq: 78258840

von Alex VandiverGesendet: Montag, 12. September 2005 09:00
An: HAM-MI-IC Torsten Brumm
Cc: todd@chaka.net; rt-users@lists.bestpractical.com
Betreff: Re: AW: [rt-users] RT 3.4.3 / Can’t locate object
method"GetDisplayedNodes" via package "Tree::Simple"
at/opt/rt3/share/html/Search/Build.html line 270.

Fuck! This can be a big Show Stopper for my Migration. Hoepfully the
Bestpractical Guys knows to fix this…

What version of Tree::Simple are you running? Does it occur when
running under standalone_httpd?

  • Alex

Tree:Simple 1.05

Fuck! This can be a big Show Stopper for my Migration. Hoepfully the
Bestpractical Guys knows to fix this…

What version of Tree::Simple are you running? Does it occur when
running under standalone_httpd?

  • Alex

Alex,

In sub ParseQquery or Build.html, why is $$tree declared instead
of $tree?

$$tree = RT::Interface::Web::QueryBuilder::Tree->new;

When dereferencing a reference to an object are these equivalent?

$tree->GetDisplayedNodes

and

${$tree}->GetDisplayedNodes

Or am I on the wrong track here?

-Todd

Alex,

In sub ParseQquery or Build.html, why is $$tree declared instead
of $tree?

$$tree = RT::Interface::Web::QueryBuilder::Tree->new;

When dereferencing a reference to an object are these equivalent?

$tree->GetDisplayedNodes

and

${$tree}->GetDisplayedNodes

Or am I on the wrong track here?

-Todd

Nevermind. Dumb question.

Are you sure that neither of you has any local modifications?

The error indicates that $tree contains an object of class
Tree::Simple, which in fact does not have a GetDisplayedNodes
method. $tree, however, should be of class
RT::Interface::Web::QueryBuilder::Tree, a subclass of Tree::Simple.

Can you grep your installed copy of RT for Tree::Simple? When I do
that, all I get is documentation and a single ‘use base’. What do
you get?

–dave
Code Monkey, Best Practical SolutionsOn Sep 12, 2005, at 3:10 PM, Todd Chapman wrote:

On Mon, Sep 12, 2005 at 03:01:06PM -0400, Todd Chapman wrote:

Alex,

In sub ParseQquery or Build.html, why is $$tree declared instead
of $tree?

$$tree = RT::Interface::Web::QueryBuilder::Tree->new;

When dereferencing a reference to an object are these equivalent?

$tree->GetDisplayedNodes

and

${$tree}->GetDisplayedNodes

Or am I on the wrong track here?

-Todd

Nevermind. Dumb question.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

David Glasser | glasser@bestpractical.com

Are you running asset tracker?

I am.

-Todd

Are you sure that neither of you has any local modifications?

The error indicates that $tree contains an object of class
Tree::Simple, which in fact does not have a GetDisplayedNodes
method. $tree, however, should be of class
RT::Interface::Web::QueryBuilder::Tree, a subclass of Tree::Simple.

Can you grep your installed copy of RT for Tree::Simple? When I do
that, all I get is documentation and a single ‘use base’. What do
you get?

–dave
Code Monkey, Best Practical Solutions

Well, I am running Asset Tracker. Its search builder is based
on the RT code, before the major refactoring. Perhaps there is
a global variable that AT is stepping on?

-Todd

Well, I am running Asset Tracker. Its search builder is based
on the RT code, before the major refactoring. Perhaps there is
a global variable that AT is stepping on?

Having taken a glance at the AT source, I think I understand the
problem.

This bug does not exist in vanilla RT – I don’t believe you can make
this happen without adding your own code. However, RT’s html/Search/
Build.html is written in such a way that it makes such a bug easy to
accidentally make.

Specifically, I believe that whenever you do “sub foo {” in a Mason <%
INIT> or <%PERL> block, the sub is actually defined in the package
HTML::Mason::Commands. Specifically, this means that if two
components define subs with the same name, they will clash.

I believe what we were seeing here was a clash between ParseQuery in
RT’s html/Search/Build.html and AT’s AssetTracker/Search/Build.html
— these are two separate pages, but they both define ParseQuery,
and so in some cases RT’s page ended up calling AT’s function.

It seems that defining subs in components should be avoided. (Of
course it’s usually better to put subs in lib/ anyway.) I will check
in a fix that changes the subs in html/Search/Build.html to be
closures assigned to a lexical variables; essentially, I am changing
"sub ParseQuery {" to “my $ParseQuery = sub {”.

(It looks like Elements/RT__Ticket/ColumnMap and (in 3.5) Elements/
MyRT could use a similar fix.)

–dave
Code Monkey, Best Practical Solutions
David Glasser | glasser@bestpractical.com

Well, I am running Asset Tracker. Its search builder is based
on the RT code, before the major refactoring. Perhaps there is
a global variable that AT is stepping on?

Having taken a glance at the AT source, I think I understand the
problem.

This bug does not exist in vanilla RT – I don’t believe you can make
this happen without adding your own code. However, RT’s html/Search/
Build.html is written in such a way that it makes such a bug easy to
accidentally make.

Specifically, I believe that whenever you do “sub foo {” in a Mason <%
INIT> or <%PERL> block, the sub is actually defined in the package
HTML::Mason::Commands. Specifically, this means that if two
components define subs with the same name, they will clash.

I believe what we were seeing here was a clash between ParseQuery in
RT’s html/Search/Build.html and AT’s AssetTracker/Search/Build.html
— these are two separate pages, but they both define ParseQuery,
and so in some cases RT’s page ended up calling AT’s function.

It seems that defining subs in components should be avoided. (Of
course it’s usually better to put subs in lib/ anyway.) I will check
in a fix that changes the subs in html/Search/Build.html to be
closures assigned to a lexical variables; essentially, I am changing
"sub ParseQuery {" to “my $ParseQuery = sub {”.

(It looks like Elements/RT__Ticket/ColumnMap and (in 3.5) Elements/
MyRT could use a similar fix.)

–dave
Code Monkey, Best Practical Solutions

David Glasser | glasser@bestpractical.com

Though with your fix it won’t be necessary, I’ll do similar in AT
and release a new version ASAP.

-Todd

Yes, i do, in the newest version.

Thanks in advance

: Torsten Brumm
: IT Security Engineer
:
: Kuehne + Nagel
: HAM - MI-C
:
: Ferdinand Strasse 29-33
: 20095 Hamburg
:
: +49 (40) 329 15 199
: +49 (40) 329 15 500
:
: torsten.brumm@kuehne-nagel.com
: www.kn-portal.com
: icq: 78258840
…-----Ursprüngliche Nachricht-----
Von: todd@chaka.net [mailto:todd@chaka.net]
Gesendet: Montag, 12. September 2005 21:40
An: HAM-MI-IC Torsten Brumm
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] RT 3.4.3 / Can’t locate object method
"GetDisplayedNodes" via package “Tree::Simple” at
/opt/rt3/share/html/Search/Build.html line 270.

Are you running asset tracker?

I am.

-Todd