Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users
Error creating new contact
 

Index | Next | Previous | View Flat


d.oliveira at prozone

Jan 18, 2010, 9:25 AM


Views: 438
Permalink
Error creating new contact

Hi,

I was trying to create a new contact via Bricolage API using Bric::Biz::Contact->edit_type() and got the error:

--
Unable to execute SQL statement: DBD::Pg::st execute failed: ERROR: column "alertable" is of type boolean but expression is of type integer
LINE 2: ...SERT INTO contact (id, type, description, active, alertable)
^
HINT: You will need to rewrite or cast the expression.
[.for Statement "
INSERT INTO contact (id, type, description, active, alertable)
VALUES (NEXTVAL('seq_contact'), ?, ?, ?, 0)
" with ParamValues: 1='Citizen ID', 3='1', 2='Citizen card number'] at /servers/bricolage/lib/Bric/Util/DBI.pm line 1084.

[/servers/bricolage/lib/Bric/Util/DBI.pm:1084]
[/servers/bricolage/lib/Bric/Biz/Contact.pm:900]
[test_contact.pl:6]

[/servers/bricolage/lib/Bric/Util/DBI.pm:1088]
[/servers/bricolage/lib/Bric/Biz/Contact.pm:900]
[test_contact.pl:6]
--

The problem was fixed by sending the zero value to the prepared statement parameters. Find the attached patch.



--
David Oliveira
<d.oliveira [at] prozone>
Attachments: bricolage_contact_fix.patch (0.66 KB)

Subject User Time
Error creating new contact d.oliveira at prozone Jan 18, 2010, 9:25 AM
    Re: Error creating new contact david at kineticode Jan 19, 2010, 9:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.