I have gone as far to add the logger, and it never shows up in the rt.log.  
Here is what I have now.


1.       ModifyQuery breaks ALL simple search (meaning, no matter what I put 
into the box to search for, I get 0 results)

2.       There is no noise in the logs from the RT Logger

3.       I have cleared the mason cache

4.       I have restarted apache

5.       Here is my ModifyQuery code - I have tried multiple variations:

a.       <%init>

$RT::Logger->debug("The initial value is $$query"); #I have also tried this 
with the $$query outside of the quotes

$$query = "fulltext:$$query"; #I have also tried $$query = "fulltext:" . 
$$query;

$RT::Logger->debug("The value is now $$query");

</%init>



<%args>

$query => undef

</%args>

b.      <%init>

my $val = $$query;

$RT::Logger->debug("The initial value is $val"); #I have also tried this with 
the $val outside of the quotes

$val = "fulltext:$val"; #I have also tried $val = "fulltext:" . $val; ##and I 
have also tried: $$query = "fulltext:$val"; #and $$query = "fulltext:" . $val;

$RT::Logger->debug("The value is now $val"); #changed to $$query if assigned to 
$$query on the line above

$$query = $val;  #this gets commented out if I change two lines up to be 
assigned directly to $$query

</%init>



<%args>

$query => undef

</%args>


I know someone can give me some pointers.  I am so confused why it's not 
working, and if the syntax is bad, why am I not at least getting something in 
the logs????


From: [email protected] 
[mailto:[email protected]] On Behalf Of Izz Abdullah
Sent: Friday, October 07, 2011 3:08 PM
To: [email protected]
Subject: Re: [rt-users] help with ModifyQuery callback

Anyone?  The below code breaks the simple query altogether.  I haven't seen 
anything from google.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Izz Abdullah
Sent: Friday, October 07, 2011 8:36 AM
To: [email protected]
Subject: [rt-users] help with ModifyQuery callback

I would appreciate some assistance in forcing FTS in simple searches...so I 
have written the following, which completely broke the simple search, but you 
get the idea of what I am trying to do (value of: 
/opt/rt4/local/html/Callbacks/hibbett/Search/Simple.html/ModifyQuery):
<%init>
my $val = $$query;
$val = "fulltext:$val";
$$query = $val;
</%init>

<%args>
$query => undef
</%args>


I imagine I could skip a step and have a one-liner: $$query = 
"fulltext:$$query"; but nonetheless, it doesn't like me modifying the query 
like this.  Is the query, at this point, sql, or is it still the text inserted 
into the search box?

I have changed owner on the tree structure to www-data:www-data, and I have 
cleared the mason cache. (clearly since the simple search will not return any 
results now) :)

I will continue to work on this, but would appreciate any assistance.

Thanks in advance,
Izz
--------
RT Training Sessions (http://bestpractical.com/services/training.html)
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Barcelona, Spain — November 28 & 29, 2011

Reply via email to