[rt-users] Weird stuff happening with Callbacks and Debugger - RESOLVED

Izz Abdullah Izz.Abdullah at hibbett.com
Tue Oct 18 13:23:46 EDT 2011

So, I figured out, I just needed to redo the chown root:www-data -R Callbacks/
I am now seeing the new logger in the rt.log file, which I was still seeing the old one to the minute, until I replaced the permissions AGAIN (same permissions I mind you).  And the callback works like a charm.
This makes no sense to me...but this corrected the issue I have been having.  Just thought I would share this saga with everyone else.

From: Izz Abdullah
Sent: Tuesday, October 18, 2011 11:55 AM
To: 'rt-users at lists.bestpractical.com'
Subject: Weird stuff happening with Callbacks and Debugger

This actually works.  It appears I just need to wait until the next day...that doesn't make sense.  What the heck is going wrong?

1.       Modify the ModifyQuery Callback

2.       Rights are as follows with ownership as root:www-data - 644

3.       rm -rf /opt/rt4/var/mason_data/obj/*

4.       restart the apache service

The only thing I did differently this morning was mv from a backup file I had used previously (in the same directory, same rights, same code) to the actual ModifyQuery file.  I changed ownership recursively on the /Callbacks folder using chown root:www-data -R /Callbacks
This was already the case, but I did it again.  Now, I modify the file, the new debug line does not show up in RT.log, and it maintains the code I had started with earlier this morning (
$$query = "fulltext:customer";

I have changed it to add before query
$RT::Logger->error("the value of the query is ",
$$query = "fulltext:$$query";

No matter what, when I do a simple search, "Hi" still shows up in the logs, but not the new logging info, and the search is hardcoded for a fulltext:customer search...still.

Any ideas on what I am missing?  I even went as far as to reboot the server.  Still getting "Hi" in the logs and the hardcoded search.  Weird...what am I missing to get it to recognize my changes?

From: Izz Abdullah
Sent: Monday, October 17, 2011 10:46 AM
To: Izz Abdullah; 'rt-users at lists.bestpractical.com'
Subject: RE: RT Logger not logging to file

The $RT->Logger calls are running as expected within the other callback I have written as well as any .pm's I have added it to for testing.  There is something wrong with the structure for the ModifyQuery in which no matter what I put, it breaks the query and I cannot obtain any logging files out of the logger, even if that is the only thing within the ModifyQuery file.

Any other ideas?

From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Izz Abdullah
Sent: Friday, October 14, 2011 8:53 AM
To: 'rt-users at lists.bestpractical.com'
Subject: [rt-users] RT Logger not logging to file

This is a follow-up to my issue with the modification of the ModifyQuery callback.  Well, I have another callback that works beautifully, as expected: SkipTransaction, and only allows the user to see the initial creation of the ticket and any correspondence (comments are omitted).  (By the way, I just tried putting in the %init portion of Create.html directly a call of $RT::Logger->debug("The current queue is " $Queue); after the rendering of the ticket page before if ticket is clone, and I did NOT receive this in the RT log.  I would appreciate any assistance in debugging the debugger!

Here is the code for that callback with the Logger inserted:
    return if $session{'CurrentUser'}->Privileged;
    if ($Transaction->Type =~ /^(Correspond|Create)$/) {

$RT::Logger->debug("The value of myskip is ",


$Transaction => undef
Now, for whatever reason, I am not seeing anything in the logs related to this.  I see all the authentication of the unprivileged user via LDAP, and the rendering of attachments (text/html) for this ticket when viewed, but no "The value of myskip is <0 or 1>"

Kevin pointed out there may be some issues with the install, but I have installed this from source and it has been tested thoroughly, and so far, the only flaw is the logger, and the fact that I can't seem to get the ModifyQuery callback working.

Any ideas why the RT logger is not working within the callbacks and not working for any calls I have added directly in the code?  It works on calls which are already in the code, and my format is the same...I would like to fix this, or find the problem as soon as possible.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111018/c334fced/attachment.htm>

More information about the rt-users mailing list