I can replicate this problem with RT 4.0.11 in many ways. I have tried
apache 2.2.x and 2.4.x with ProxyPass and ReWrite rules with the
NoEscape option [NE]. This does not fix the problem. Here is the exact
way to replicate the issue.
With ProxyPass enabled go to Query Builder and add any search term,
select Add these terms and Search. This will blow up with a URL that
contains escape characters like this:
Search/Results.html?Format=%2527%2520%2520%2520%253Cb%253E%253Ca%2520href%253D%2522__WebPath__%252FTicket%252FDisplay.html%253Fid%253D__id__%2522%253E__id__%253C%252Fa%253E%253C%252Fb%253E%252FTITLE%253A%2523%2527%252C%250A%2527%253Cb%253E%253Ca%2520href%253D%2522__WebPath__%252FTicket%252FDisplay.html%253Fid%253D__id__%2522%253E__Subject__%253C%252Fa%253E%253C%252Fb%253E%252FTITLE%253ASubject%2527%252C%250A%2527__Status__%2527%252C%250A%2527__QueueName__%2527%252C%250A%2527__OwnerName__%2527%252C%250A%2527__Priority__%2527%252C%250A%2527__NEWLINE__%2527%252C%250A%2527%2527%252C%250A%2527%253Csmall%253E__Requestors__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__CreatedRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__ToldRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__LastUpdatedRelative__%253C%252Fsmall%253E%2527%252C%250A%2527%253Csmall%253E__TimeLeft__%253C%252Fsmall%253E%2527Order=ASC%257CASC%257CASC%257CASCOrderBy=id%257C%257C%257CQuery=id%2520%253C%25202000RowsPerPage=50SavedChartSearchId=newSavedSearchId=new
Without changing anything I can get the search to work by going back to
the query builder and adding a search term but instead of choosing Add
these terms and Search I select Add these terms then the click the
Show Results link that appears. Here is the same exact search result URL:
Search/Results.html?SavedChartSearchId=newRowsPerPage=50Page=Format='+++ba+href%3D__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__idid__%2Fa%2Fb%2FTITLE%3A%23'%2C%0A'ba+href%3D__WebPath__%2FTicket%2FDisplay.html%3Fid%3D__idSubject__%2Fa%2Fb%2FTITLE%3ASubject'%2C%0A'__Status__'%2C%0A'__QueueName__'%2C%0A'__OwnerName__'%2C%0A'__Priority__'%2C%0A'__NEWLINE__'%2C%0A''%2C%0A'small__Requestors__%2Fsmall'%2C%0A'small__CreatedRelative__%2Fsmall'%2C%0A'small__ToldRelative__%2Fsmall'%2C%0A'small__LastUpdatedRelative__%2Fsmall'%2C%0A'small__TimeLeft__%2Fsmall'Order=ASC|ASC|ASC|ASCSavedSearchId=Query=id++2000OrderBy=id|||
The difference I notice in the code is that the Add these terms and
Search button uses a perl url redirect where the Show Results link
does not. Here is the log output from the errored search (with server
location starred out):
[Thu Apr 18 16:52:51 2013] [error]: The 'message' parameter (Wrong
query, expecting a OPERATOR in 'id%20--here%3C%202000' at
/*//rt-4.0.11/sbin/../lib/RT/SQL.pm line 135.
Stack:
[/*//rt-4.0.11/sbin/../lib/RT/SQL.pm:135]
[/*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm:237]
[/*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm:293]
[/*//rt-4.0.11/share/html/Search/Results.html:109]
[/*//rt-4.0.11/sbin/../lib/RT/Interface/Web.pm:635]
[/*//rt-4.0.11/sbin/../lib/RT/Interface/Web.pm:336]
[/*//rt-4.0.11/share/html/autohandler:53]
) to Log::Dispatch::Output::log was a 'hashref object', which is not
one of the allowed types: scalar
at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux/Params/Validate/XS.pm
line 11.
Params::Validate::XS::__ANON__('The \'message\' parameter
(Wrong query, expecting a OPERATOR...') called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch/Output.pm line 39
Log::Dispatch::Output::log(undef, 'level', 'error', 'name',
'screen', 'message', 'HTML::Mason::Exception=HASH(0x6a95280)') called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 214
Log::Dispatch::_log_to('Log::Dispatch=HASH(0xb84808)', 'level',
'error', 'name', 'screen', 'message',
'HTML::Mason::Exception=HASH(0x6a95280)') called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 167
Log::Dispatch::_log_to_outputs('Log::Dispatch=HASH(0xb84808)', 'level',
'error', 'message', 'HTML::Mason::Exception=HASH(0x6a95280)') called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 145
Log::Dispatch::log('Log::Dispatch=HASH(0xb84808)', 'level',
'error', 'message', '') called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/Log/Dispatch.pm line 42
Log::Dispatch::__ANON__('Log::Dispatch=HASH(0xb84808)', '')
called at /*//rt-4.0.11/sbin/../lib/RT/Tickets_SQL.pm line 295
RT::Tickets::FromSQL('RT::Tickets=HASH(0x689e1a0)',
'id%20%3C%202000') called at
/*//rt-4.0.11/share/html/Search/Results.html line 109
HTML::Mason::Commands::__ANON__('Order',
'ASC%7CASC%7CASC%7CASC', 'Query', 'id%20%3C%202000', 'SavedSearchId',
'new', 'SavedChartSearchId', 'new', 'OrderBy', ...) called at
/*/perl/perl-5.16.3/lib/site_perl/5.16.3/HTML/Mason/Component.pm
line 138