[rt-users] URL Error after upgrading to rt4

Chris O'Kelly Chris.okelly at minecorp.com.au
Tue Feb 19 17:09:53 EST 2013

Hi Rolf,

It looks like you are missing the closing quotes on the line you inserted:

        I insert as line #2
        use lib "/opt/rt4/lib/RT;

should be

        use lib "/opt/rt4/lib/RT";

The error message eludes to this by:

        (Might be a runaway multi-line "" string starting on line 2)



Chris O'Kelly
Systems & Web Administrator

Minecorp Australia
P: 07 3723 1000
M: 0450 586 190

Minecorp Australia
37 Murdoch Circuit
Acacia Ridge QLD 4110

Sent Via a Mobile Device.

-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Rolf Krogstad
Sent: Wednesday, 20 February 2013 8:05 AM
To: rt-users at lists.fsck.com
Subject: Re: [rt-users] URL Error after upgrading to rt4

Kevin Falcone <falcone <at> bestpractical.com> writes:

> On Thu, Feb 14, 2013 at 10:29:30PM +0000, Rolf Krogstad wrote:
> > Hello,
> >
> > I have created a new server (RedHat 5.9 64-bit) and am running the latest
> > version of MySQL and RT 4.0.10.   The old server was RT 3.6.6
> There were some bugs in early 3.6 RTs where it would store the full
> URL so /rt3/Ticket/Display.html?id=__id__ rather than
> /__WebPath__/Ticket/Display.html?id=__id__
> > With one user I can go in and select a ticket and it opens fine with the
> > http://v20labtrack/Ticket/Display.html?id=2973
> >
> > If I log in as a different user it generates this URL which comes up with
> > a "page not found" error:
> > http://v20labtrack/rt3/Ticket/Display.html?id=2973
> This implies some users have a version of the Format for the search
> that includes __WebPath__ and some include /rt3/ literally.
> There's a new branch that adds an upgrade script

> You can grab that script and try running it on a development copy of
> your data and see if it properly repairs the links for you.
> Try it out and let us know how it goes?  The branch needs review and
> merging, but test results from the field are really helpful.
> -kevin

Thanks, Kevin.   Not being a perl expert I need some assistance.
I managed to get my library path inserted but have one syntax to correct.
I insert as line #2
use lib "/opt/rt4/lib/RT;
I then deleted an empty line from the comment section so the code lines line
up with your example.

I am getting this back on the compile:
syntax error at ./fix-3.6-search-result-format-in-attribute.pl line 66,
near "&& $content->{Format} =~ s!(?<=href=")"
  (Might be a runaway multi-line "" string starting on line 2)

My URL is generating (for example):
and I want it to be:

so I changed this line to rt3:
    my $path = shift @ARGV || 'rt3';

how do I need to change this one?
    && $content->{Format} =~ s!(?<=href=")/$path(?=/|$)!__WebPath__!ig )

thanks   Rolf

RT training in Amsterdam, March 20-21: http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T

More information about the rt-users mailing list