[Rt-devel] Help with error

Speicher, Joshua (TekSecure Labs) JSpeicher at teksecurelabs.com
Wed Jan 30 12:33:41 EST 2008

I just upgraded our development RT from 3.6.5 to 3.6.6.  In the process
SearchBuilder was upgraded to 1.51.  And reapplied the priority-labels
patch from the Wiki.  Everything seems to be working correctly except
for creating a ticket using the web interface.  The error I'm seeing is
as follows:


[Wed Jan 30 17:01:12 2008] [crit]: Couldn't create a ticket: Internal
Error: Couldn't execute the query 'INSERT INTO Tickets (Status, Queue,
Started, Type, InitialPriority, Starts, LastUpdated, Subject,
FinalPriority, Creator, Owner, LastUpdatedBy, Resolved, Created,
Priority, Due) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'


I'm not sure how or why this is happening.  First I checked what the
Priority Labels patch changed, and from what I can tell it shouldn't
affect the insert values being '?'.  I tracked the process to insert a
ticket and saw the following in SearchBuilder/Handle.pm.


sub InsertQueryString {

    my($self, $table, @pairs) = @_;

    my(@cols, @vals, @bind);


    while ( my $key = shift @pairs ) {

        push @cols, $key;

        push @vals, '?';

        push @bind, shift @pairs;



    my $QueryString = "INSERT INTO $table";

    $QueryString .= " (". join(", ", @cols) .")";

    $QueryString .= " VALUES (". join(", ", @vals). ")";

    return ($QueryString, @bind);



Now I'm no Perl expert, but wouldn't pushing '?' result in all the @vals
being '?'... or am I just going crazy from staring at code for too long?


Any ideas on how to fix this error, or at least help me figure out what
I broke.


Joshua P Speicher

Web Developer/Security Engineer

TekSecure Labs (sm)

(a division of Tekmark Global Solutions)

This message is for the designated recipient only and it, as well as any attachments, may contain privileged, proprietary or confidential information. If you are not the intended recipient, do not read, copy or distribute it. Please notify the sender immediately and delete the original at once. Any other use of the email by you is prohibited. Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20080130/b1c6b0f5/attachment.htm 

More information about the Rt-devel mailing list