I have the same problem (noticed somewhere around version 2-1-87). Iām
currently 3-0-2pre4 (with perl 5.8.0, apache 1.3.26, postgres 7.3.2r1-4)
but still have the backslash problem. The backslash is considered an
escape character so whenever I need to add text containing a backslash I
add a second one. Added text with only one backslash will end up with
the error:
Apr 28 13:35:24 rt postgres[1245]: [3] ERROR: Bad input string for type
bytea
Apr 28 15:35:24 rt RT: DBD::Pg::st execute failed: ERROR: Bad input
string for type bytea at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm
line 385. (/opt/rt3.0.2pre4/lib/RT.pm:222)
Apr 28 15:35:24 rt RT: RT::Handle=HASH(0x9840830) couldnāt execute the
query āINSERT INTO Attachments (Subject, ContentType, Filename, Headers,
Creator, Parent, Created, ContentEncoding, Content, TransactionId)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)ā at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 392.
(/opt/rt3.0.2pre4/lib/RT.pm:222)
If you followed the upgrade procedure through the betas, you should have
converted all of your bytea columns to ātextā.
Thatās your problem.On Mon, Apr 28, 2003 at 01:57:11PM +0200, Alex Fung A Foek wrote:
I have the same problem (noticed somewhere around version 2-1-87). Iām
currently 3-0-2pre4 (with perl 5.8.0, apache 1.3.26, postgres 7.3.2r1-4)
but still have the backslash problem. The backslash is considered an
escape character so whenever I need to add text containing a backslash I
add a second one. Added text with only one backslash will end up with
the error:
Apr 28 13:35:24 rt postgres[1245]: [3] ERROR: Bad input string for type
bytea
Apr 28 15:35:24 rt RT: DBD::Pg::st execute failed: ERROR: Bad input
string for type bytea at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm
line 385. (/opt/rt3.0.2pre4/lib/RT.pm:222)
Apr 28 15:35:24 rt RT: RT::Handle=HASH(0x9840830) couldnāt execute the
query āINSERT INTO Attachments (Subject, ContentType, Filename, Headers,
Creator, Parent, Created, ContentEncoding, Content, TransactionId)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)ā at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 392.
(/opt/rt3.0.2pre4/lib/RT.pm:222)
regards,
Alex Fung A Foek
Sergey Tsvetukhin wrote:
Hello
I create a new ticket via e-mail or vie web.
Subject line and body contain text with two slashes
you should consider telling us what rt version you are using.
since you answered you used 3.0.2pre3 you should consider an upgrade to
3.0.2pre4 which eliminates many problems.
The anti-slash "" (simple or double) pb seems to be linked with a bad upgrade
more than with the version itselfā¦ you should see a post just following the
next thread by Jesse.
Does anyone have the link to this script? I know itās been quite some time so Iām wondering where I can find this. I running RT 4.0.8 with PostgreSQL 9.2, converted over from MySQL using pgloader. Iām having these same issues when trying to add replies or comments to tickets with slashes. Iām also having issues with fulltext-search and bytea, preventing indexing from completing.
my $dbh = DBI->connect(ādbi:Pg:dbname=rt3ā, āpostgresā, āā);
foreach my $col (qw(Content Headers)) {
$dbh->do(āALTER TABLE Attachments RENAME COLUMN $col to Old$colā);
$dbh->do(āALTER TABLE Attachments ADD COLUMN $col text NULLā);
my $sel = $dbh->prepare("SELECT id, Old$col FROM Attachments");
my $upd = $dbh->prepare("UPDATE Attachments SET $col = ? WHERE id = ?");
my ($id, $data);
$sel->execute;
$sel->bind_columns(\$id, \$data);
while ($sel->fetch) {
$upd->execute($data, $id);
}
$dbh->do("ALTER TABLE Attachments DROP COLUMN Old$col");
I was able to modify /opt/rt4/lib/RT/Attachment.pm to get to this work as well. My RT 4.0.8 install was different so the file location was actually /opt/rt4/as/Linux/local/lib/RT/Attachment.pm.
On RT 4.0.8 Add line 193 in file
$Body =~ /\/\\/gm;