XLS export balks

Hello listmates,

I have an RT 4.2.0 installation using Postgresql as DB engine running on a
CentOS 6 server where every attempt to extract a search to XLS results in a
failure.

The failure manifests itself in the following way. The user’s browser
displays the following message:

An internal RT error has occurred. Your administrator can find more
details in RT’s log files.

The Apache/HTTPD log displays the following:

[27915] [Wed Sep 9 21:20:27 2015] [error]: Undefined subroutine
&RT::SQL::PossibleCustomFields called at
/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
line 80.

Stack:
[/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]*

  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]*
  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]*
  • [/opt/rt4/share/html/autohandler:53]
    (/opt/rt4/sbin/…/lib/RT/Interface/Web/Handler.pm:211)*

Here is what I think is the relevant excerpt
from /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls


my $col_entry = sub {

  • my $col = shift;*
  • in tsv output, “#” is often a comment character but we use it for

“id”*

  • delete $col->{title}*
  •    if $col->{title} and $col->{title} =~ /^\s*#\s*$/;*
    
  • return {*
  •    header => loc($col->{title} || $col->{attribute}),*
    
  •    map    => $m->comp(*
    
  •        "/Elements/ColumnMap",*
    
  •        Name  => $col->{attribute},*
    
  •        Attr  => 'value'*
    
  •    ),*
    

Line 80 is the line that says: my $col = shift;

Has anyone encountered something like this? Any idea what this may be?

Thanks.

Boris.

Perhaps this is related:

https://rt.cpan.org/Public/Bug/Display.html?id=92168

Boris.On Wed, Sep 9, 2015 at 5:52 PM, Boris Epstein borepstein@gmail.com wrote:

Hello listmates,

I have an RT 4.2.0 installation using Postgresql as DB engine running on a
CentOS 6 server where every attempt to extract a search to XLS results in a
failure.

The failure manifests itself in the following way. The user’s browser
displays the following message:

An internal RT error has occurred. Your administrator can find more
details in RT’s log files.

The Apache/HTTPD log displays the following:

[27915] [Wed Sep 9 21:20:27 2015] [error]: Undefined subroutine
&RT::SQL::PossibleCustomFields called at
/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
line 80.

Stack:
*
[/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]*

  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]*
  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]*
  • [/opt/rt4/share/html/autohandler:53]
    (/opt/rt4/sbin/…/lib/RT/Interface/Web/Handler.pm:211)*

Here is what I think is the relevant excerpt
from /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls


my $col_entry = sub {

  • my $col = shift;*
  • in tsv output, “#” is often a comment character but we use it for

“id”*

  • delete $col->{title}*
  •    if $col->{title} and $col->{title} =~ /^\s*#\s*$/;*
    
  • return {*
  •    header => loc($col->{title} || $col->{attribute}),*
    
  •    map    => $m->comp(*
    
  •        "/Elements/ColumnMap",*
    
  •        Name  => $col->{attribute},*
    
  •        Attr  => 'value'*
    
  •    ),*
    

Line 80 is the line that says: my $col = shift;

Has anyone encountered something like this? Any idea what this may be?

Thanks.

Boris.

Hate to say it but perhaps it is something different as our XLS is
extension is version 0.08 which apparently is the right version.

So search goes on…

Boris.On Wed, Sep 9, 2015 at 5:59 PM, Boris Epstein borepstein@gmail.com wrote:

Perhaps this is related:

Human Verification

Boris.

On Wed, Sep 9, 2015 at 5:52 PM, Boris Epstein borepstein@gmail.com wrote:

Hello listmates,

I have an RT 4.2.0 installation using Postgresql as DB engine running on
a CentOS 6 server where every attempt to extract a search to XLS results in
a failure.

The failure manifests itself in the following way. The user’s browser
displays the following message:

An internal RT error has occurred. Your administrator can find more
details in RT’s log files.

The Apache/HTTPD log displays the following:

[27915] [Wed Sep 9 21:20:27 2015] [error]: Undefined subroutine
&RT::SQL::PossibleCustomFields called at
/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
line 80.

Stack:
*
[/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls:80]*

  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:680]*
  • [/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:368]*
  • [/opt/rt4/share/html/autohandler:53]
    (/opt/rt4/sbin/…/lib/RT/Interface/Web/Handler.pm:211)*

Here is what I think is the relevant excerpt
from /opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls


my $col_entry = sub {

  • my $col = shift;*
  • in tsv output, “#” is often a comment character but we use it for

“id”*

  • delete $col->{title}*
  •    if $col->{title} and $col->{title} =~ /^\s*#\s*$/;*
    
  • return {*
  •    header => loc($col->{title} || $col->{attribute}),*
    
  •    map    => $m->comp(*
    
  •        "/Elements/ColumnMap",*
    
  •        Name  => $col->{attribute},*
    
  •        Attr  => 'value'*
    
  •    ),*
    

Line 80 is the line that says: my $col = shift;

Has anyone encountered something like this? Any idea what this may be?

Thanks.

Boris.

Hello listmates,

I have an RT 4.2.0 installation using Postgresql as DB engine running on
a CentOS 6 server where every attempt to extract a search to XLS results
in a failure.

The failure manifests itself in the following way. The user’s browser
displays the following message:

An internal RT error has occurred. Your administrator can find more
details in RT’s log files.

The Apache/HTTPD log displays the following:

[27915] [Wed Sep 9 21:20:27 2015] [error]: Undefined subroutine
&RT::SQL::PossibleCustomFields called at
/opt/rt4/local/plugins/RT-Extension-SearchResults-XLS/html/Search/Results.xls
line 80.

*

there is no call to PossibleCustomFields in latest (0.08) extension
version. Seems you are running an old version, double check this …

Extension is running fine here on severals setup similar to your :slight_smile:

Easter-eggs Spécialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

Emmanuel,

This is interesting. So are you saying you run a special GIT repository
just for your RT installation(s)?

Boris.On Fri, Sep 11, 2015 at 3:49 AM, Emmanuel Lacour elacour@easter-eggs.com wrote:

Le 10/09/2015 11:20, Boris Epstein a écrit :

Emmanuel, thank you very much. Will do.

Is there a standardized way to tell and track the version numbers of RT
extensions/components?

I’don’t know.

Here I track every RT instalation using git :slight_smile:


Easter-eggs Spécialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

Here I track every RT instalation using git :slight_smile:

so do i

This is interesting. So are you saying you run a special GIT repository
just for your RT installation(s)?

just a

git init && git add . && git commit -m "just installed"  

after the installation and

g commit -a 

when i changed something

Marc Chantreux,
Mes coordonn�es: Annuaire - Université de Strasbourg
Direction Informatique, Universit� de Strasbourg (http://unistra.fr)
“Don’t believe everything you read on the Internet”
– Abraham Lincoln

Le 11/09/2015 11:43, Marc Chantreux a �crit :> On Fri, Sep 11, 2015 at 05:29:20AM -0400, Boris Epstein wrote:

Here I track every RT instalation using git :slight_smile:

so do i

This is interesting. So are you saying you run a special GIT repository
just for your RT installation(s)?

just a

git init && git add . && git commit -m "just installed"  

after the installation and

g commit -a 

when i changed something

you would better use a branch for upstream and one for your (or many if
you have prod/staging/…).

It’s easier when you need to upgrade RT or compare your patches with
upstream…

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

you would better use a branch for upstream and one for your (or many if
you have prod/staging/…).

i really would like but i don’t know how to run RT from the sources
(it seems you need to install it somewhere and run it from this place).

It’s easier when you need to upgrade RT or compare your patches with
upstream…

i patch the installed versions and maintain my own repos :frowning: this is sad
and i would be really happy to change it.

regards

Marc Chantreux,
Mes coordonn�es: Annuaire - Université de Strasbourg
Direction Informatique, Universit� de Strasbourg (http://unistra.fr)
“Don’t believe everything you read on the Internet”
– Abraham Lincoln

Le 11/09/2015 15:45, Marc Chantreux a �crit :

you would better use a branch for upstream and one for your (or many if
you have prod/staging/…).

i really would like but i don’t know how to run RT from the sources
(it seems you need to install it somewhere and run it from this place).

It’s easier when you need to upgrade RT or compare your patches with
upstream…

i patch the installed versions and maintain my own repos :frowning: this is sad
and i would be really happy to change it.

I ended up storing a configured version in my upstream branch for the
same problem.

So here is the process used here:

  • I do a clean ./configure … and make install of RT (no edition of
    config files)
  • I put this in git in a branch upstrean/4.2 and tag the release
  • I checkout this in a branch “prod”
  • I make my custom configuration/patches in prod
  • when I need to install an extension, I first install it in upstream
    branch and merge it in prod (thus I can patch it in prod if needed)

a new RT release comes:

  • I run the same ./configure…make install as previously done
  • I put the result in upstream branch and commit this as upgrade to RT 4.2.x
  • I merge upstream in prod

you can do it with pure sources, but you won’t be able to “easily”
deploy it on servers.

And FYI our developpement rules:

For html files

  • uses callback and put them in local directory
  • no callback, add the missing one in share/html (patch) (submit it to
    upstream if it may be of any interest for anyone else) and add the
    callback file in local directory
  • need a new mason component: put it in local/html directory
  • need to really patch an existing one: do it in place in share/html
    (never copy the file to local dir, upgrades will be a pain!)

For lib files

  • put new methods in local/lib/RT/xxx_Local.pm
  • put new objects in local/lib/RT/…
  • need to patch an existing method: try to do so by creating a
    local/lib/RT/xxx_Local.pm with:

my $old_method = &Method;

*Method = sub {
my $self = shift;
my %args = ( @_ );

$old_method->($self, @_);

  • if you really need to patch the method, do it inplace in lib/RT/…,
    never copy a lib file/method to local dir or upgrades will be a pain!

et voil� :wink:

tip: I just discovered git “submodules” feature that may be used for RT
extensions … maybe

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com