RT 3.6.3 - WebURL not Expanding for Ticket Display

Hi All,

We were given an RT server that has RT 3.6.3 on it. The setup is
working fine with the exception that when a user clicks on a ticket
that under “10 Highest Priority Tickets I Own” the path to the ticket
isn’t listed correctly.

For example:

WebBaseURL: mydomain.edu
WebPath: /rt

When I click on a ticket I own I get:

http://mydomain.edu/Ticket/Display.html?id=44

Instead of:

http://mydomain.edu/rt/Ticket/Display.html?id=44

All other links on the page work properly (that is the ‘rt’ is added
between the base URL and the any other parameter). More confusing is
the fact that new tickets that aren’t owned display fine (and the URL
is resolved correctly).

I’m not terribly familiar with the setup/operation of RT. I did find
one message that sounded similar to this at:

But the fix suggested there didn’t seem to take on this system. Any
help would greatly appreciated.

Thanks in advance,

Dave

David W. Gohara, Ph.D.
Center for Computational Biology
Washington University School of Medicine

http://www.macresearch.org
314-362-1583 (phone) <=== NEW New Number
617-216-8616 (cell)

The fix you mentioned was recommended by me, works on the systems I have
running RT. I don’t have any truly clean 3.6.3 installs, they’re all
upgrades, so I can’t say if something NEW is broken, but if the fix I
mentioned is correctly applied, it should work fine based on your
symptoms.

According to Jesse Vincent the problem was fixed in 3.6.2.On Fri, 2006-12-29 at 13:08 -0600, David Gohara wrote:

Hi All,

We were given an RT server that has RT 3.6.3 on it. The setup is
working fine with the exception that when a user clicks on a ticket
that under “10 Highest Priority Tickets I Own” the path to the ticket
isn’t listed correctly.

For example:

WebBaseURL: mydomain.edu
WebPath: /rt

When I click on a ticket I own I get:

http://mydomain.edu/Ticket/Display.html?id=44

Instead of:

http://mydomain.edu/rt/Ticket/Display.html?id=44

All other links on the page work properly (that is the ‘rt’ is added
between the base URL and the any other parameter). More confusing is
the fact that new tickets that aren’t owned display fine (and the URL
is resolved correctly).

I’m not terribly familiar with the setup/operation of RT. I did find
one message that sounded similar to this at:

Carbon60: Managed Cloud Services

But the fix suggested there didn’t seem to take on this system. Any
help would greatly appreciated.

Thanks in advance,

Dave

The fix you mentioned was recommended by me, works on the systems I have
running RT. I don’t have any truly clean 3.6.3 installs, they’re all
upgrades, so I can’t say if something NEW is broken, but if the fix I
mentioned is correctly applied, it should work fine based on your
symptoms.

This was a 3.6.1 install upgraded to 3.6.3. Applying the fix
described in the post doesn’t however solve the problem. Even more
strange, and something I just noticed, is that the ticket number next
to the subject has the correct URL as well. It’s just the subject that
isn’t getting the correct URL. So every instance is getting expanded
properly except the subject.

Is there perhaps another place that a similar fix can be applied to
get the subject link to work properly (again, this only affects a
ticket once it’s in the “Tickets I Own” grouping)? In the grand scheme
of things it’s not a big deal since the ticket number link works, but
if there is a simple fix it would be nice.

Thanks,

Dave

David W. Gohara, Ph.D.
Center for Computational Biology
Washington University School of Medicine

314-362-1583 (phone) <=== NEW New Number
617-216-8616 (cell)

This was a 3.6.1 install upgraded to 3.6.3.

Exactly the same as my environment.

Applying the fix
described in the post doesn’t however solve the problem. Even more
strange, and something I just noticed, is that the ticket number next
to the subject has the correct URL as well. It’s just the subject that
isn’t getting the correct URL. So every instance is getting expanded
properly except the subject.

Yes, exactly the same as my environment.

I’m 99% certain that the fix described was not properly applied. Could
you send lines 103-106 of the patched file? Thanks.

This was a 3.6.1 install upgraded to 3.6.3.

Yes, exactly the same as my environment.

I’m 99% certain that the fix described was not properly applied. Could
you send lines 103-106 of the patched file? Thanks.

Hi Matthew,

Thanks. Here are the lines with the patch applied:

$SearchArg->{‘Query’} =~ s/CurrentUser/$session{‘CurrentUser’}-

Id/ge;
$SearchArg->{‘Format’} =~ s/WebPath/$RT::WebPath/g;
$SearchArg->{‘Format’} =~ s/href="/Ticket/href="$RT::WebPath/
Ticket/g;
$SearchArg->{‘Format’} =~ s/loc([“']?(\w+)[”']?)/loc(“$1”)/ge;

Thanks for your help,

Dave

David W. Gohara, Ph.D.
Center for Computational Biology
Washington University School of Medicine

314-362-1583 (phone) <=== NEW New Number
617-216-8616 (cell)

$SearchArg->{‘Query’} =~ s/CurrentUser/$session{‘CurrentUser’}-

Id/ge;
$SearchArg->{‘Format’} =~ s/WebPath/$RT::WebPath/g;
$SearchArg->{‘Format’} =~ s/href="/Ticket/href="$RT::WebPath/
Ticket/g;
$SearchArg->{‘Format’} =~ s/loc([“']?(\w+)[”']?)/loc(“$1”)/ge;

I can’t tell if the patched line is wrapped because of the mailer, or in
the code- regardless, it shouldn’t be. Also, you may need to restart
your webserver (Apache I assume). I have mixed success with making
component changes and having them live. If that really isn’t fixing the
problem, the other solution listed in my initial remedy note is the
RIGHT solution, and that’s changing the template in the database. Note
that when looking at the template in the database, it may well be base64
encoded, and thus look like “garbage”, just base64decode it and it’ll be
clear where the problem is.

Reposted below for simplicity:

$SearchArg->{‘Query’} =~ s/CurrentUser/$session{‘CurrentUser’}-

Id/ge;
$SearchArg->{‘Format’} =~ s/WebPath/$RT::WebPath/g;
$SearchArg->{‘Format’} =~ s/href="/Ticket/href="$RT::WebPath/
Ticket/g;
$SearchArg->{‘Format’} =~ s/loc([“']?(\w+)[”']?)/loc(“$1”)/ge;

I can’t tell if the patched line is wrapped because of the mailer,
or in
the code- regardless, it shouldn’t be. Also, you may need to restart
your webserver (Apache I assume).

Each $SearchArg statement was a single line. I restarted apache
after adding in those lines and it still didn’t take (I also made
sure to empty my cache just to be certain).

I have mixed success with making
component changes and having them live. If that really isn’t fixing
the
problem, the other solution listed in my initial remedy note is the
RIGHT solution, and that’s changing the template in the database.
Note
that when looking at the template in the database, it may well be
base64
encoded, and thus look like “garbage”, just base64decode it and
it’ll be
clear where the problem is.

The only place I see a reference to “Search - My Tickets” is in
etc/initialdata. Since I’m not familiar with RT on the back end
(again this system was just handed to us), I’m not certain if this is
the file I should edit or not. I recall in looking through the
install manuals that this is for the initial setup of the system. If
this isn’t the correct database file, could you be so kind as to
point me to where I can find the correct file?

Also, what tool would I use to base64 decode the database if
necessary?

Thanks again for your help,

Dave

David W. Gohara, Ph.D.
Center for Computational Biology
Washington University School of Medicine

314-362-1583 (phone) <=== NEW New Number
617-216-8616 (cell)

The only place I see a reference to “Search - My Tickets” is in
etc/initialdata. Since I’m not familiar with RT on the back end
(again this system was just handed to us), I’m not certain if this is
the file I should edit or not. I recall in looking through the
install manuals that this is for the initial setup of the system. If
this isn’t the correct database file, could you be so kind as to
point me to where I can find the correct file?

RT needs a database server, and most likely it’s a MySQL server. If
you’re not familiar with it, I’d pass this on to someone who is:

In the rt3 database, Attributes table, is a a record for "Search

  • My Tickets" … it needs to say:

<a href="WebPath/Ticket

where it says:

<a href="/Ticket

Also, what tool would I use to base64 decode the database if
necessary?

A little Perl ditty:

use MIME::Base64;

print decode_base64(join(’ ',@ARGV));