Some searches produce tickets with incorrect links

Hi,

I have successfully migrated my RT database from 3.6.7 to 4.0.7 on
Debain Wheezy and Postgresql 9.2.

Everything is looking good with the exception of the following problem I
have found.

If I do a search with the following criteria in the New Search query
builder screen, then I get a results page that works fine - the links to
tickets are formatted correctly.

Queue = ‘Abroad’
AND Status = ‘new’

Each ticket has a link such as :-
https://rt4.mydomain.com/Ticket/Display.html?id=324944 where clicking on
it displayed the ticket information.

If I now slightly amend the search to the following criteria:

Queue = ‘Abroad’
AND (
Status = ‘new’
OR Status = ‘open’)

then the results screen offers ticket results with an incorrect link :-
https://rt4.mydomain.com/rt/Ticket/Display.html?id=324944

Note the extra “/rt” after the domain name. Clicking on these links
goes to my page not found processing on nginx, ie back to the login page.

Clicking on the Advanced menu bar link shows the format of the output,
and each time, the ‘<a href="…’ line matches the link of the
ticket, which is either correct (works) or incorrect (fails). I have
checked the $DefaultSearchResultFormat in my RT_Config.pm file (I have
confirmed it is not changed in my RT_SiteConfig.pm file) and it states
the following :-

Set ($DefaultSearchResultFormat, qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
QueueName,
OwnerName,
Priority,
NEWLINE’,
‘’,
Requestors’,
CreatedRelative’,
ToldRelative’,
LastUpdatedRelative’,
TimeLeft’});

What is causing this issue with certain search criteria ? On previous
tests with this particular setup, but without the migrated ticket
information, these searches always worked fine.

Hoping someone knows …

Gary

If I now slightly amend the search to the following criteria:

Queue = ‘Abroad’
AND (
Status = ‘new’
OR Status = ‘open’)

then the results screen offers ticket results with an incorrect link
:- https://rt4.mydomain.com/rt/Ticket/Display.html?id=324944

Are you actually building that search fresh or are you loading a saved
search?

Was your old RT located at mydomain.com/rt/ ? There were bugs in
early 3.6 versions that hardcoded the WebPath rather than using
WebPath and I bet you have older saved searches that are
triggering it.

-kevin